PHP Класс 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
С версии: 3.0
Наследование: extends TBaseValidator
Показать файл Открыть проект

Открытые методы

Метод Описание
getMaxSelection ( ) : integer
getMinSelection ( ) : integer
getRequiredSelections ( ) : string Get a comma separated list of required selected values.
setMaxSelection ( $value )
setMinSelection ( $value )
setRequiredSelections ( $value ) Set the list of required values, using aa comma separated list.

Защищенные методы

Метод Описание
evaluateIsValid ( ) : boolean This method overrides the parent's implementation.
getClientClassName ( ) : string Gets the name of the javascript class responsible for performing validation for this control.
getClientScriptOptions ( ) : array Returns an array of javascript validator options.
getRequiredValues ( ) : array
getSelection ( $control ) : array

Описание методов

evaluateIsValid() защищенный Метод

The validation succeeds if the input component changes its data from the InitialValue or the input component is not given.
protected evaluateIsValid ( ) : boolean
Результат boolean whether the validation succeeds

getClientClassName() защищенный Метод

This method overrides the parent implementation.
protected getClientClassName ( ) : string
Результат string the javascript class name

getClientScriptOptions() защищенный Метод

Returns an array of javascript validator options.
protected getClientScriptOptions ( ) : array
Результат array javascript validator options.

getMaxSelection() публичный Метод

public getMaxSelection ( ) : integer
Результат integer max number of selections. Defaults to -1, meaning not set.

getMinSelection() публичный Метод

public getMinSelection ( ) : integer
Результат integer min number of selections. Defaults to -1, meaning not set.

getRequiredSelections() публичный Метод

Get a comma separated list of required selected values.
public getRequiredSelections ( ) : string
Результат string comma separated list of required values.

getRequiredValues() защищенный Метод

protected getRequiredValues ( ) : array
Результат array list of required values.

getSelection() защищенный Метод

protected getSelection ( $control ) : array
Результат array number of selected values and its values.

setMaxSelection() публичный Метод

public setMaxSelection ( $value )

setMinSelection() публичный Метод

public setMinSelection ( $value )

setRequiredSelections() публичный Метод

Set the list of required values, using aa comma separated list.
public setRequiredSelections ( $value )