Custom Validation dont´s work
-
I tried to create a custom validation following your documentation, but dont´s work.
What´s wrong?
add_action( 'user_registration_validate_number_crm','fcw_crm_validate_crm',10,4); function fcw_crm_validate_crm($single_form_field, $data, $filter_hook, $form_id) { $field_label = isset( $data->label ) ? $data->label : ''; $value = isset( $data->value ) ? $data->value : ''; if (strlen($value) > 5) { return; } add_filter( $filter_hook, function ( $msg ) use ( $field_label ) { return __( $field_label . 'is too short.', 'user-registration' ); }); }The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Custom Validation dont´s work’ is closed to new replies.