使用PHP Form Builder类框架时,是否有方法更改错误处理消息?

使用PHP Form Builder类框架时,是否有方法更改错误处理消息?,php,ajax,form-post,Php,Ajax,Form Post,我想获取有错误的字段,并显示与下面显示的不同的消息: 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"])) {

我想获取有错误的字段,并显示与下面显示的不同的消息:

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();
}

查找并编辑renderAjaxErrorResponseI找到Required.php并更改了所需的类验证。这解决了我的问题,但我不是我真正想要的。遗憾的是,这个框架没有办法传递您想要显示的信息。任何预先制作的东西都有一个问题,那就是不是您想要的100%——所以我从不使用框架。