Nette\Forms\Form::getOwnErrors PHP Метод

getOwnErrors() публичный Метод

Returns form's validation errors.
public getOwnErrors ( ) : array
Результат array
    public function getOwnErrors()
    {
        return array_unique($this->errors);
    }

Usage Example

 /**
  * @param bool $ownOnly - true = render only global errors, false = render all errors of all controls
  * @return Html
  */
 public function renderGlobalErrors($ownOnly = TRUE)
 {
     $errors = $ownOnly ? $this->form->getOwnErrors() : $this->form->getErrors();
     $container = clone $this->prototypes->getGlobalErrors();
     foreach ($errors as $error) {
         $alert = clone $this->prototypes->getGlobalError();
         $this->addContent($alert->getPlaceholder(), $error);
         $container->getPlaceholder()->addHtml($alert);
     }
     return $container;
 }
All Usage Examples Of Nette\Forms\Form::getOwnErrors