Support

Account

Home Forums General Issues acf_form Validation in Block Reply To: acf_form Validation in Block

  • Thanks, John. I tried that but it didn’t seem to affect the Ajax validation, only the fields appearance. The JS solution is working well though so I’m going to run with that having now added in a check to see if the targeted for is being validated and ‘passing’ it if so:

    
    acf.add_filter('validation_complete', function( json ){
    
    	var	match 	= false,
    		val 	= "acf[field_123xyz]";
    
    	$.each( json.errors, function( index, value ){
    		if( value.input == val ) match = true;
    	} )
    
    	return match ? { valid: 1 } : json;
    });