#23138: please add min_length to django.db.models.fields.Field
-------------------------------------+-------------------------------------
     Reporter:  anonymous            |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |                  Version:  1.6
    Component:  Database layer       |               Resolution:
  (models, ORM)                      |             Triage Stage:
     Severity:  Normal               |  Unreviewed
     Keywords:                       |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by timo):

 If we added `min_length` to model fields, I'd think it should be enforced
 at the database level. Do all of the core databases support minimum length
 validation? (my guess is no.) In that case, it may be better to solve your
 use case (Python level validation) by adding a `MinLengthValidator()` to
 your field.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/23138#comment:2>
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 
https://groups.google.com/d/msgid/django-updates/067.1ed18654b5c5d2c35b1b181e6d36ce52%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to