src/FormHandler.php
public function fieldHasError($fieldName)
    {
        foreach ($this->errors as $error) {
            if ($error->getParam() == $fieldName) {
                return true;
            }
        }

        if (!$this->isSubmitted()) {
            return false;
        }

        if (isset($this->validator) && $this->validator->fieldHasError($fieldName)) {
            return true;
        }
    }
public function fieldHasError($fieldName)
    {
        foreach ($this->errors as $error) {
            if ($error->getParam() == $fieldName) {
                return true;
            }
        }

        if (!$this->isSubmitted()) {
            return false;
        }

        if (isset($this->validator) && $this->validator->fieldHasError($fieldName)) {
            return true;
        }
    }
public function fieldHasError ( $ fieldName ) { foreach ( $ this -> errors as $ error ) { if ( $ error -> getParam ( ) == $ fieldName ) { return true ; } } if ( ! $ this -> isSubmitted ( ) ) { return false ; } if ( isset ( $ this -> validator ) && $ this -> validator -> fieldHasError ( $ fieldName ) ) { return true ; } }
Check if a field has an error

@param $fieldName
@return bool
Check if a field has an error