public function errors() : array
    {
        $errors = [];
        foreach ($this->tests as $error => $test) {
            if (!$test($this->getValue())) {
                $errors[] = $error;
            }
        }
        return $errors;
    }
public function errors() : array
    {
        $errors = [];
        foreach ($this->tests as $error => $test) {
            if (!$test($this->getValue())) {
                $errors[] = $error;
            }
        }
        return $errors;
    }
public function errors ( ) : array { $ errors = [ ] ; foreach ( $ this -> tests as $ error => $ test ) { if ( ! $ test ( $ this -> getValue ( ) ) ) { $ errors [ ] = $ error ; } } return $ errors ; }
Get array of errors for element.

@return array
Get array of errors for element .