Skip to content

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

@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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy