Opened 17 years ago

Closed 17 years ago

#4652 closed (invalid)

URLField controls the text even if verify_exists and required are False

Reported by: Eren Türkay <turkay.eren@…> Owned by: Adrian Holovaty
Component: Forms Version: 0.96
Severity: Keywords: urlfield
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hi,

I have and URLField in user membership form, it's not optional and the initial value is http:// When I blank homepage input as is, django gives error "Enter a valid URL" even if I set required false. in forms.py line 287, super function is called regardless of controlling this option.

Attachments (1)

test.py (404 bytes ) - added by Eren Türkay <turkay.eren@…> 17 years ago.
test-case

Download all attachments as: .zip

Change History (2)

by Eren Türkay <turkay.eren@…>, 17 years ago

Attachment: test.py added

test-case

comment:1 by Chris Beaven, 17 years ago

Resolution: invalid
Status: newclosed

The clean_* methods are called after the field's own clean method so you're getting it too late. You'd have to subclass URLField to do what you want to do.

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