I am trying to understand how the examples in Error Checking (http://docs.blesta.com/display/dev/Error+Checking)relate to the JSON formated version of Input Rules in the Universal Module. All the examples in Error Checking are php arrays. The simple examples seem obvious, but how would the ones with functions be done in Input Rules?
What is the correct way to validate an email address given the Service Option of admin_email?
{
"admin_email":{
"valid":{
"rule":["filter_var",["admin_email","FILTER_VALIDATE_EMAIL"]],
"message":"Please enter a valid email address."
}
}
}
The above fires but fails with a valid address in the field.
Why aren't there more examples in the docs for the JSON formatted Input Rules?