Skip to content

Commit

Permalink
bug #4615 Update NotBlank to reflect the actual validation (DRvanR)
Browse files Browse the repository at this point in the history
This PR was submitted for the 2.6 branch but it was merged into the 2.3 branch instead (closes #4615).

Discussion
----------

Update NotBlank to reflect the actual validation

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | all
| Fixed tickets | n/a

As can be seen in the [validator][1] class values that are false also lead to a violation. This was not documented, which we discovered when using this constraint 😉

[1]: https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Validator/Constraints/NotBlankValidator.php#L34

Commits
-------

b11ad2e Update NotBlank to reflect the actual validation
  • Loading branch information
weaverryan committed May 22, 2015
2 parents b0c069a + b11ad2e commit a61c8c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions reference/constraints/NotBlank.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
NotBlank
========

Validates that a value is not blank, defined as not equal to a blank string
and also not equal to ``null``. To force that a value is simply not equal
to ``null``, see the :doc:`/reference/constraints/NotNull` constraint.
Validates that a value is not blank, defined as not strictly ``false``, not equal to a blank
string and also not equal to ``null``. To force that a value is simply not equal to
``null``, see the :doc:`/reference/constraints/NotNull` constraint.

+----------------+------------------------------------------------------------------------+
| Applies to | :ref:`property or method <validation-property-target>` |
Expand Down

0 comments on commit a61c8c6

Please sign in to comment.