示例#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);
 }
示例#2
0
 public function getLocalValue()
 {
     return $this->formContext->getData()->getDataCopy();
 }
示例#3
0
文件: Element.php 项目: gsouf/uform
 /**
  * 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);
 }