Class \Prado\Web\UI\WebControls\TRequiredFieldValidator
TRequiredFieldValidator makes the associated input control a required field. The input control fails validation if its value does not change from the \Prado\Web\UI\WebControls\setInitialValue property upon losing focus.
Validation will also succeed if input is of TListControl type and the number of selected values different from the initial value is greater than zero.
If the input is of TListControl type and has a \Prado\Web\UI\WebControls\TListControl::setPromptValue set, it will be automatically considered as the validator's \Prado\Web\UI\WebControls\setInitialValue.
Class hierarchy
- \Prado\Web\UI\WebControls\TRequiredFieldValidator
- \Prado\Web\UI\WebControls\TBaseValidator implements IValidator
- \Prado\Web\UI\WebControls\TLabel implements IDataRenderer
- \Prado\Web\UI\WebControls\TWebControl implements IStyleable
- \Prado\Web\UI\TControl implements IRenderable, IBindable
- \Prado\TApplicationComponent
- \Prado\TComponent
Since: 3.0
public
|
|
public
|
|
protected
|
evaluateIsValid() : bool
This method overrides the parent's implementation.
The validation succeeds if the input component changes its data from the \Prado\Web\UI\WebControls\getInitialValue or the input control is not given. Validation will also succeed if input is of TListControl type and the number of selected values different from the initial value is greater than zero. |
protected
|
getClientClassName() : string
Gets the name of the javascript class responsible for performing validation for this control.
This method overrides the parent implementation. |
protected
|
getClientScriptOptions() : array<string|int, mixed>
Returns an array of javascript validator options.
|
protected
|
|
private
|
|
private
|
|
private
|