Prado\Web\UI\WebControls\TCustomValidator::getValidationTarget PHP Method

getValidationTarget() public method

public getValidationTarget ( ) : TControl
return TControl control to be validated. Null if no control is found.
    public function getValidationTarget()
    {
        if (($id = $this->getControlToValidate()) !== '' && ($control = $this->findControl($id)) !== null) {
            return $control;
        } else {
            if (($id = $this->getControlToValidate()) !== '') {
                throw new TInvalidDataTypeException('basevalidator_validatable_required', get_class($this));
            } else {
                return null;
            }
        }
    }