Skip to content

[Validator] Documented the allowEmptyString option in Length #11886

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

Merged
merged 1 commit into from
Jul 4, 2019

Conversation

javiereguiluz
Copy link
Member

@javiereguiluz javiereguiluz commented Jul 4, 2019

This fixes #11875.

When upmerging to master, contents will be replaced by the following:

allowEmptyString
~~~~~~~~~~~~~~~~

**type**: ``boolean``  **default**: ``false``

If set to ``true``, empty strings are considered valid (which is the same
behavior as previous Symfony versions). The default ``false`` value considers
empty strings not valid.

@xabbuh
Copy link
Member

xabbuh commented Jul 4, 2019

If the default value changes in 5.0, we should emphasize this here IMO.

@javiereguiluz
Copy link
Member Author

@xabbuh maybe ... the trick here is that when using the min option, you MUST add this option explicitly too ... so when upgrading to Symfony 5.0 there can't be any surprises ... it doesn't matter (much) if the default value changes, because you don't rely on the default value because you were forced to add this option.

But if you really think we should mention this, let's do it. Thanks.

@javiereguiluz javiereguiluz merged commit c510abb into symfony:4.4 Jul 4, 2019
javiereguiluz added a commit that referenced this pull request Jul 4, 2019
…ngth (javiereguiluz)

This PR was merged into the 4.4 branch.

Discussion
----------

[Validator] Documented the allowEmptyString option in Length

This fixes #11875.

When upmerging to `master`, contents will be replaced by the following:

```rst
allowEmptyString
~~~~~~~~~~~~~~~~

**type**: ``boolean``  **default**: ``false``

If set to ``true``, empty strings are considered valid (which is the same
behavior as previous Symfony versions). The default ``false`` value considers
empty strings not valid.
```

Commits
-------

c510abb [Validator] Documented the allowEmptyString option in Length
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants