custom validation issue
-
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.
- The topic ‘custom validation issue’ is closed to new replies.