I have been hitting a roadblock here, I am a novice coder and a bit rusty as well. The below code works fully in a wordpress functions file but I really want to validate from a CSV file vs entering 2000 lines to validate against.
add_filter('frm_validate_field_entry', 'mobileform_custom_validation', 10, 3);
function mobileform_custom_validation($errors, $posted_field, $posted_value){
if($posted_field->id == 496){ //change 496 to the ID of the field to validate
if(!in_array($posted_value, array('001','002'))){ //change 001 and 002 to your allowed values
//if it doesn't match up, add an error:
$errors['field'. $posted_field->id] = 'Please contact us.';
}
}
return $errors;
}