8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 788950a commit 0bc1cc7Copy full SHA for 0bc1cc7
components/options_resolver.rst
@@ -403,12 +403,11 @@ is thrown::
403
For options with more complicated validation schemes, pass a closure which
404
returns ``true`` for acceptable values and ``false`` for invalid values::
405
406
- $resolver->setAllowedValues(array(
407
- // ...
408
- $resolver->setAllowedValues('transport', function ($value) {
409
- // return true or false
410
- });
411
- ));
+
+ // ...
+ $resolver->setAllowedValues('transport', function ($value) {
+ // return true or false
+ });
412
413
In sub-classes, you can use :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::addAllowedValues`
414
to add additional allowed values without erasing the ones already set.
0 commit comments