Django

Code

Ticket #3281 (closed: fixed)

Opened 2 years ago

Last modified 2 years ago

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

Reported by: zendak Assigned to: adrian
Milestone: Component: Forms
Version: SVN Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

fields.diff (470 bytes) - added by astrec on 01/11/07 10:20:28.
replacement patch - non-relative header, and .diff extension

Change History

01/11/07 10:04:45 changed by anonymous

  • summary changed from newforms.URLField() does not validate with both required=False and verify_exists=True to [patch] newforms.URLField() does not validate with both required=False and verify_exists=True.

01/11/07 10:20:28 changed by astrec

  • attachment fields.diff added.

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

01/12/07 23:19:15 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

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

01/15/07 06:48:58 changed by zendak

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


Add/Change #3281 ([patch] newforms.URLField() does not validate with both required=False and verify_exists=True)




Change Properties
Action