Esempio n. 1
0
 /**
  * Checks if children of an element are valid
  * @param Element|null $element leave it null to check the current element or give an element instance to check it
  */
 public function childrenAreValid(Element $element = null)
 {
     if (null === $element) {
         $element = $this->element;
     }
     return $this->formContext->childrenAreValid($element);
 }
Esempio n. 2
0
 public function getLocalValue()
 {
     return $this->formContext->getData()->getDataCopy();
 }
Esempio n. 3
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);
 }