add_filter('frm_validate_field_entry', 'check_min_length', 8, 3);
function check_min_length($errors, $posted_field, $posted_value){
if($values['form_id'] == 2){
if ( $posted_field->id == 10 && $posted_value != '' ){
$words = explode(' ', $posted_value);
$count = count($words);
if($count < 6)
$errors['field'. $posted_field->id] = 'Please provide a more complete response. Your response must be six words or more.';
}
return $errors;
}
}
Please login or Register to submit your answer