#25594: Difficult to customize model field default_validators and have them 
used on
both model and form fields
     Reporter:  Marcin Nowak         |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0

Comment (by Arthur Pemberton):

 My ticket was marked as a duplicate of this,  I'm not sure I agree, but
 I'll re-post here:

 Example  URL: "myscheme://server/group-name/item-name"

 Problem 1: `models.URLField` needs to be subclassed to change allowed
 Problem 2: `forms.URLField` needs to be subclassed to change allowed
 Problem 3: `validators.URLValidator` needs to be subclassed to change
 `regex` to allow `netloc` that is a hostname without a domain ad TLD

 At the very least, making these changes should be documented better. The
 message accompanying ValidationError gives no hint as to the source issue
 with a URL.

Ticket URL: <https://code.djangoproject.com/ticket/25594#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to