hi, I'm referring to this custom validation sample:
add_filter('gform_validation', 'custom_validation');
function custom_validation($validation_result){
// set the form validation to false
$validation_result["is_valid"] = false;
$form = $validation_result["form"];
// specify the first field to be invalid and provide custom validation message
$form["fields"][0]["failed_validation"] = true;
$form["fields"][0]["validation_message"] = "This field is invalid!";
// update the form in the validation result with the form object you modified
$validation_result["form"] = $form;
return $validation_result;
}
How do I access the fields actual value to validate it?
$form["fields"][0]["value"] doesn't seem to work?
where in the docs do I find the list of possibilities for this $form["fields"] array?
thanks