Skip to content

CharField: allow_blank=False in combination with trim_whitespace=True does not behave as expected #2710

Closed
@johtso

Description

@johtso

The two options can not be used in combination to raise a validation error if the incoming data purely consists of whitespace because to_internal_value is not applied before validation.

Is this something that could be changed? And is there a way for me to achieve this behaviour currently without writing custom validation?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions