Custom validation not firing :(
-
Hello,
I’m trying to add a custom validation to a text field to both Login and Registration forms, but I can’t get it to fire ??I’m using a child theme, and my code is in the functions.php in that theme, here’s the function:
function um_custom_validate_mobile_number( $key, $array, $args ) { //die("I waz here"); - this never fires either! UM()->form()->add_error( $key, __( 'Secret word not valid', 'ultimate-member' ) ); } add_action( 'um_custom_field_validation_secret_word_login', 'um_custom_validate_mobile_number', 30, 3 );
In the form itself, the meta key, and custom action are both: secret_word_login
and the Validate is set to Custom Validation. The new field is also set to Required, but I can’t get the form to fail to log in – whether I put the value in the Secret Word field or not…Am I missing something? Many thanks for your help!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Custom validation not firing :(’ is closed to new replies.