Code

Opened 6 years ago

Closed 5 years ago

#7755 closed (fixed)

Allow EmailField(blank=True) with models validation

Reported by: Harm Geerts Owned by: nobody
Component: Database layer (models, ORM) Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Patch to prevent the email validator from validating a blank field.
If the field has blank=False it will be caught in Field.validate_full

Attachments (1)

django-models-validation-emailfield-blank.patch (2.3 KB) - added by Harm Geerts 6 years ago.

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by Harm Geerts

comment:1 Changed 6 years ago by julianb

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 5 years ago by thejaswi_puthraya

  • Component changed from Uncategorized to Database layer (models, ORM)

comment:3 Changed 5 years ago by SmileyChris

  • Resolution set to fixed
  • Status changed from new to closed

This works now. EmailField is a subclass of RegexField which does the right thing.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.