public function getErrorMessages()
    {
        $errors = [];
        foreach ($this->fields as $field) {
            if ($field instanceof AbstractFormField && !$field->isValid()) {
                $fldErrors = $field->getErrorMessages();
                $errors = array_merge($errors, $fldErrors);
            }
        }

        return $errors;
    }
public function getErrorMessages()
    {
        $errors = [];
        foreach ($this->fields as $field) {
            if ($field instanceof AbstractFormField && !$field->isValid()) {
                $fldErrors = $field->getErrorMessages();
                $errors = array_merge($errors, $fldErrors);
            }
        }

        return $errors;
    }
public function getErrorMessages ( ) { $ errors = [ ] ; foreach ( $ this -> fields as $ field ) { if ( $ field instanceof AbstractFormField && ! $ field -> isValid ( ) ) { $ fldErrors = $ field -> getErrorMessages ( ) ; $ errors = array_merge ( $ errors , $ fldErrors ) ; } } return $ errors ; }
Fetch all error messages for fields

@return array
Fetch all error messages for fields