public function errors(): ValidationErrors
    {
        $errors = new ValidationErrors();
        foreach ($this as $key => $element) {
            if ($element instanceof HasValueValidationInterface) {
                $e = $element->errors();
                if (!$e->empty()) {
                    $errors[$key] = $e;
                }
            }
        }
        return $errors;
    }
public function errors(): ValidationErrors
    {
        $errors = new ValidationErrors();
        foreach ($this as $key => $element) {
            if ($element instanceof HasValueValidationInterface) {
                $e = $element->errors();
                if (!$e->empty()) {
                    $errors[$key] = $e;
                }
            }
        }
        return $errors;
    }
public function errors ( ) : ValidationErrors { $ errors = new ValidationErrors ( ) ; foreach ( $ this as $ key => $ element ) { if ( $ element instanceof HasValueValidationInterface ) { $ e = $ element -> errors ( ) ; if ( ! $ e -> empty ( ) ) { $ errors [ $ key ] = $ e ; } } } return $ errors ; }
Returns validation errors collection

@todo: cache errors

@return \Runn\Html\ValidationErrors
Returns validation errors collection