• Resolved cln00

    (@cln00)


    I followed the documentation and another answer here about using your specific hooks to define custom validation, it worked with “user_registration_validate_user_email” but once I change it to “user_registration_validate_[field_name]” it won’t work, is it specific for email and username only ?

    // add_action( ‘user_registration_validate_number_box_1605799382′,’ur_validate_number_box_1605799382_field’,10,4);
    // function ur_validate_number_box_1605799382_field($single_form_field, $data, $filter_hook, $form_id) {
    // $field_label = isset( $data->label ) ? $data->label : ”;
    // $value = isset( $data->value ) ? $data->value : ”;

    // if( condition ) {
    // add_filter( $filter_hook, function ( $msg ) use ( $field_label ) {
    // return __( $field_label . ‘Please enter a valid number.’, ‘user-registration’ );
    // });
    // }
    // }

Viewing 1 replies (of 1 total)
  • Plugin Support sanjuacharya77

    (@sanjuacharya77)

    Hi @cln00,

    We had received your support ticket in our email support and the issue has been fixed via email support. Feel free to write to us if you have any other queries and I will get back to you.

    Thanks and Regards!

Viewing 1 replies (of 1 total)

The topic ‘Create custom validation for registration fields programmatically’ is closed to new replies.