public function sanitizeValidatorResult(Result $result, $validationName)
    {
        $newResult = new Result;

        $this->sanitizeValidatorResultMessages('error', $result->getFlattenedErrors(), $newResult, $validationName);
        $this->sanitizeValidatorResultMessages('warning', $result->getFlattenedWarnings(), $newResult, $validationName);
        $this->sanitizeValidatorResultMessages('notice', $result->getFlattenedNotices(), $newResult, $validationName);

        return $newResult;
    }
public function sanitizeValidatorResult(Result $result, $validationName)
    {
        $newResult = new Result;

        $this->sanitizeValidatorResultMessages('error', $result->getFlattenedErrors(), $newResult, $validationName);
        $this->sanitizeValidatorResultMessages('warning', $result->getFlattenedWarnings(), $newResult, $validationName);
        $this->sanitizeValidatorResultMessages('notice', $result->getFlattenedNotices(), $newResult, $validationName);

        return $newResult;
    }
public function sanitizeValidatorResult ( Result $ result , $ validationName ) { $ newResult = new Result ; $ this -> sanitizeValidatorResultMessages ( 'error' , $ result -> getFlattenedErrors ( ) , $ newResult , $ validationName ) ; $ this -> sanitizeValidatorResultMessages ( 'warning' , $ result -> getFlattenedWarnings ( ) , $ newResult , $ validationName ) ; $ this -> sanitizeValidatorResultMessages ( 'notice' , $ result -> getFlattenedNotices ( ) , $ newResult , $ validationName ) ; return $ newResult ; }
This function will go through all errors, warnings and notices and check
if they are instances of `FormzMessageInterface`. If not, they are
converted in order to have more informations that are needed later.

@param Result $result
@param string $validationName
@return Result
This function will go through all errors warnings and notices and check if they are instances of FormzMessageInterface . If not they are converted in order to have more informations that are needed later .