OptionsResolver setAllowedValues(string $option, mixed $allowedValues)
Sets allowed values for an option.
Instead of passing values, you may also pass a closures with the following signature:
function ($value) {
// return true or false
}
The closure receives the value as argument and should return true to accept the value and false to reject the value.
Please login to continue.