Пример #1
0
 /**
  * Get the children of the current element
  * @return \UForm\Form\Element[]
  */
 public function getMessages()
 {
     return $this->formContext->getChainedValidation()->getValidation($this->element->getInternalName(true), true)->getMessages();
 }
Пример #2
0
 /**
  * Internal use - prepare the validation object
  *
  * @param DataContext $localValues
  * @param FormContext $formContext
  * @throws \UForm\Exception
  */
 public function prepareValidation(DataContext $localValues, FormContext $formContext)
 {
     $validators = $this->getValidators();
     $v = new ValidationItem($localValues, $this, $formContext);
     $v->addValidators($validators);
     $formContext->getChainedValidation()->addValidation($v);
 }