I'm using the authorize.net add-on and trying to set a minimum amount on a user defined price field. I'm trying to set the minimum amount to enter as $10 but for some reason its not working. Here's the code I'm using:
// Set minimum amount on cc form to be $10
add_filter("gform_field_validation_51_7", "custom_validation", 10, 4);
function custom_validation($result, $value, $form, $field){
if($result["is_valid"] && intval($value) < 10){
$result["is_valid"] = false;
$result["message"] = "The minimum payment must be more than $10";
}
return $result;
}
Here's a link to the form: https://www.intouchamerica.com/online-payment/
Is there something I'm missing?
Thanks