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

Commit03d356b

Browse files
committed
feature#18527 [Validator] UpdateType constraint, addnumber,finite-float andfinite-number validations (guillaume-a)
This PR was merged into the 6.4 branch.Discussion----------[Validator] Update `Type` constraint, add `number`, `finite-float` and `finite-number` validationsDocumentation for PR*symfony/symfony#50907Related to*symfony/symfony#50782This is my first sf-docs PR, please tell me if I did anything wrong.Thank you.Commits-------458fdd5 [Validator] Update `Type` constraint, add `number`, `finite-float` and `finite-number` validations
2 parentsc3a449d +458fdd5 commit03d356b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎reference/constraints/Type.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,5 +208,14 @@ Also, you can use ``ctype_*()`` functions from corresponding
208208
Make sure that the proper:phpfunction:`locale <setlocale>` is set before
209209
using one of these.
210210

211+
Finally, you can use aggregated functions:
212+
213+
* ``number``: ``is_int || is_float && !is_nan``
214+
* ``finite-float``: ``is_float && is_finite``
215+
* ``finite-number``: ``is_int || is_float && is_finite``
216+
217+
..versionadded::6.4
218+
``number``, ``finite-float`` and ``finite-number`` were introduced in Symfony 6.4.
219+
211220
.. _built-in PHP extension:https://www.php.net/book.ctype
212221
.. _a list of ctype functions:https://www.php.net/ref.ctype

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp