Skip to content

Describe how empty strings affect the validation of string constraints #4244

Closed
@xabbuh

Description

@xabbuh

For example, when an empty string is validated through the Length constraint, it is considered to be valid no matter if the constraint required a minimum length (see symfony/symfony#11943). It should be made clear that you also have to use the NotBlank constraint to disallow empty strings too.

Note that the Length constraint isn't the only constraint with this behaviour.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ValidatoractionableClear and specific issues ready for anyone to take them.good first issueIdeal for your first contribution! (some Symfony experience may be required)hasPRA Pull Request has already been submitted for this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions