• Hello.
    I need help with one simple thing.
    I got cusrom walidation to the field but it’s only one value to it.
    I got code from your forum, and it’s work grate:

    add_action('um_submit_form_errors_hook', 'check_B_Sur', 100);
    function check_B_Sur( $args ){
    
    global $ultimatemember;
    
    	if ( isset( $args['B_Sur'] ) && $args['B_Sur'] != 'abcdef' ) {
    		$ultimatemember->form->add_error( 'B_Sur', 'invalid code entered');
    	}
    }

    But it’s checking only one value.
    For example if user type in the field abcdef, he will pass validation, but if he type in Abcdef, or ABCDEF, he wont. How to set few values to be good for validation?
    Validation works as custom spam question i register form. It’s question “How much is nine minus 2?”, and the correct anwser is seven, but also SEVEN, and Seven.
    Thank You, and sorry for my english.

  • The topic ‘Custom Field Validation’ is closed to new replies.