Opened 7 years ago

Closed 7 years ago

#3038 closed defect (fixed)

[patch] newforms: RegexField shouldn't validate an empty input if required is set to False

Reported by: Thomas Steinacher <tom@…> Owned by: adrian
Component: Forms Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


RegexField shouldn't validate an empty input if the required attribute is set to False

I'm getting an error (Enter a valid e-mail address) when entering nothing into this email field:

 email = forms.EmailField(required=False)

Attachments (1)

forms.patch (617 bytes) - added by Thomas Steinacher <tom@…> 7 years ago.
proposed patch

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by Thomas Steinacher <tom@…>

proposed patch

comment:1 Changed 7 years ago by adrian

  • Component changed from Core framework to django.newforms

comment:2 Changed 7 years ago by adrian

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

(In [4111]) Fixed #3038 -- newforms: RegexField no longer validates empty input for required=False. Thanks for reporting, Thomas Steinacher

Add Comment

Modify Ticket

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

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

Note: See TracTickets for help on using tickets.