Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#3281 closed defect (fixed)

[patch] newforms.URLField() does not validate with both required=False and verify_exists=True

Reported by: zendak Owned by: Adrian Holovaty
Component: Forms Version: dev
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The following newforms field will prevent its form from validating if given a "False" value (empty string or None):

url = newforms.URLField(required=False, verify_exists=True)

This combination of required and verify_exists causes a conflict. Note that for a corresponding model.URLField(blank=True, verify_exists=True) there is no such conflict when accessed through the Admin.

Attachments (1)

fields.diff (470 bytes ) - added by astrec 18 years ago.
replacement patch - non-relative header, and .diff extension

Download all attachments as: .zip

Change History (4)

comment:1 by anonymous, 18 years ago

Summary: newforms.URLField() does not validate with both required=False and verify_exists=True[patch] newforms.URLField() does not validate with both required=False and verify_exists=True

by astrec, 18 years ago

Attachment: fields.diff added

replacement patch - non-relative header, and .diff extension

comment:2 by Adrian Holovaty, 18 years ago

Resolution: fixed
Status: newclosed

(In [4313]) Fixed #3281 -- newforms: URLField now works properly with required=False and verify_exists=True together. Thanks, zendak

comment:3 by zendak, 18 years ago

Thanks for the patch, astrec, you beat me to it. Works perfectly now.

Note: See TracTickets for help on using tickets.
Back to Top