• Resolved Feijao Costa

    (@feijao)


    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)
  • Saroj Shah

    (@wpeverestsupportrep)

    Hi @feijao

    Sorry for the late response. This issue requires proper testing for which, I request you to contact our developer team. You can contact them here: https://wpeverest.com/contact/ so that they will try to replicate the issue on your site and provide you the fix ASAP.

    Regards!

Viewing 1 replies (of 1 total)

The topic ‘Custom Validation dont´s work’ is closed to new replies.