Skip to content

[Validator][ChoiceValidator] null value cause SQL crash #12163

Closed
@remyfrd

Description

@remyfrd

When I use Assert Choice (ChoiceValidator). If value is null and not in choices value, I have a SQL crash.

[1/3] PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'type' cannot be null

I need to add NotBlankValidator. So it's work.

But, null is not in my authorized choices... So I think I no need to add an other validator.

What do you think about this ? I can make a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions