/** * 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(); }
/** * 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); }