<span class="resolved" aria-label="Resolved" title="Topic is resolved."></span>custom validation issue

[ad_1]

Replies: 0

added this to my functions.php page in the child theme and it gives me a critical error and breaks the page.

function um_custom_validate_invite( $key, $array, $args ) {
if ( isset( $args[$key] ) && ! in_array( $args[$key],['dog','cat','bird','fish','cow','pig']) ) {
UM()->form()->add_error( $key, __( ‘Please enter valid Invitation code.’, ‘ultimate-member’ ) );
}
}
add_action( ‘um_custom_field_validation_invite’, ‘um_custom_validate_invite’, 30, 3 );

it says unexpected identifier (T_STRING)

what am i doing wrong? Please help.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer