Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8231230

Browse files
committed
Fix according to PR comments
1 parent94fe8dc commit8231230

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

‎components/options_resolver.rst

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,11 @@ There is also an
305305
method, which you can use if you want to add an allowed value to the previously
306306
set allowed values.
307307

308-
If you need to add some more logic to the value validation process you can pass a callable
308+
..versionadded::2.5
309+
310+
The callback support for allowed values was introduced in Symfony 2.5.
311+
312+
If you need to add some more logic to the value validation process, you can pass a callable
309313
as an allowed value::
310314

311315
// ...
@@ -315,15 +319,14 @@ as an allowed value::
315319

316320
$resolver->setAllowedValues(array(
317321
'transport' => function($value) {
318-
return strpos($value, 'mail') !== false;
319-
}
322+
returnfalse !==strpos($value, 'mail');
323+
},
320324
));
321325
}
322326

323-
Note that using this together with addAllowedValues will not work.
327+
..caution::
324328

325-
..versionadded::2.5
326-
The callback support for allowed values was added in Symfony 2.5.
329+
Note that using this together with ``addAllowedValues`` will not work.
327330

328331
Configure allowed Types
329332
~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp