Support

Account

Home Forums General Issues Validate text area Reply To: Validate text area

  • You need to add a filter to validate the value of your field. The documentation is here http://www.advancedcustomfields.com/resources/acf-validate_value/.

    Something like this:

    
    add_filter('acf/validate_value/name=your_field_name', 'my_validate_function', 10, 4);
    function my_validate_function($valid, $value, $field, $input) {
        $words = explode(' ', $value);
        if (count($words) < 10) {
            $valid = 'Please enter at least 10 words!';
        }
    }