PHP Class Prado\Web\UI\WebControls\TListControlValidator
TListControlValidator checks the number of selection and their values
for a
TListControl that allows multiple selection.
You can specify the minimum or maximum (or both) number of selections
required using the {@link setMinSelection MinSelection} and
{@link setMaxSelection MaxSelection} properties, respectively. In addition,
you can specify a comma separated list of required selected values via the
{@link setRequiredSelections RequiredSelections} property.
Examples
- At least two selections
- "value1" must be selected
and at least 1 other
Exibir arquivo
Open project: pradosoft/prado
Public Methods
Protected Methods
Method Details
evaluateIsValid()
protected method
The validation succeeds if the input component changes its data
from the InitialValue or the input component is not given.
getClientClassName()
protected method
This method overrides the parent implementation.
getClientScriptOptions()
protected method
Returns an array of javascript validator options.
getMaxSelection()
public method
getMinSelection()
public method
getRequiredSelections()
public method
Get a comma separated list of required selected values.
getRequiredValues()
protected method
getSelection()
protected method
setMaxSelection()
public method
setMinSelection()
public method
setRequiredSelections()
public method
Set the list of required values, using aa comma separated list.