8000 Added a note about the usage of NotBlank by javiereguiluz · Pull Request #10407 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Added a note about the usage of NotBlank #10407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file 8000
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Final reword
  • Loading branch information
javiereguiluz committed Sep 26, 2018
commit 6f0dcd64498e0c9f41d3cf0714ccf77cb67f1689
4 changes: 2 additions & 2 deletions reference/constraints/_empty-values-are-valid.rst.inc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. note::

As with the rest of the constraints, ``null`` values and empty strings are
considered valid values. Otherwise, in addition to validating this value,
As with most of the rest of constraints, ``null`` values and empty strings
are considered valid values. Otherwise, in addition to validating this value,
you would also be requiring it, making it impossible to be optional. That's
why most of the times this constraint is combined with
:doc:`NotBlank </reference/constraints/NotBlank>`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought if we should maybe reword this a bit:

As with most of the other constraints, null values and empty strings are considered valid values. This is to allow them to be optional values. If the values is mandatory, a common solution is to combine this constraint with NotBlank.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that your wording is better. Could you please create a pull request for it? Thanks a lot!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here we go: #10418

0