我想获取有错误的字段并显示与下面显示不同的消息:
The following 3 errors were found:
Error: field1 is a required field.
Error: field2 is a required field.
Error: field3 is a required field.
此代码处理错误:
if(isset($_POST["form"])) {
if(Form::isValid($_POST["form"])) {
//ok
}
else
//prints the errors
Form::renderAjaxErrorResponse($_POST["form"]);
exit();
}