sfValidatorChoice validates than the value is one of the expected values.
Method Summary
-
configure($options = array(), $messages = array())
Configures the current validator.
-
doClean($value)
-
Boolean
inChoices($value, $choices = array())
Checks if a value is part of given choices (see bug #4212)
addMessage , addOption , addRequiredOption , asString , clean , configure , doClean , getCharset , getDefaultMessages , getDefaultOptions , getEmptyValue , getErrorCodes , getMessage , getMessages , getMessagesWithoutDefaults , getOption , getOptions , getOptionsWithoutDefaults , getRequiredOptions , hasOption , isEmpty , setCharset , setDefaultMessages , setDefaultOptions , setInvalidMessage , setMessage , setMessages , setOption , setOptions , setRequiredMessage , __construct
Method Details
-
configure ($options = array(), $messages = array())
Browse code
| $options |
An array of options
|
| $messages |
An array of error messages
|
Configures the current validator.
Available options: * choices: An array of expected values (required)
* multiple: true if the select tag must allow multiple selections
-
-
(Boolean) inChoices ($value, $choices = array())
Browse code
| $value |
The value to check
|
| $choices |
The array of available choices
|
Checks if a value is part of given choices (see bug #4212)
|