/** * 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); }
public function getLocalValue() { return $this->formContext->getData()->getDataCopy(); }
/** * 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); }