Home Forums Front-end Issues Custom Validation Reply To: Custom Validation

  • Hi @locomo

    Thanks for the question. You can use a JS filter to hook in and run validation on any field! This is not yet documented but does work.

    Use it like so:
    * Note, this is jQuery

    $(document).on('acf/validate_field', function( e, field ){
    	// vars
    	$field = $(field);
    	// set validation to false on this field
    	if( $field.find('input').val() == 'test' )
    		$'validation', false);