Opened 14 years ago

Closed 14 years ago

#13761 closed (invalid)

CharField.min_length doesn't work

Reported by: Oroku Saki Owned by: nobody
Component: Database layer (models, ORM) Version: 1.2
Severity: Keywords: validators
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Using trunk from Friday or so,

I see self.validators.append(validators.MaxLengthValidator(self.max_length)), but no self.validators.append(validators.MinLengthValidator(self.min_length)) in db.models.fields.

Here's the exception, using manage.py runserver 80:

TypeError: __init__() got an unexpected keyword argument 'min_length'

Orokusaki

Attachments (1)

orokusaki_db.models.fields.patch (1.5 KB ) - added by Oroku Saki 14 years ago.
Might need to switch direction of min_length / max_length, etc but it's a start.

Download all attachments as: .zip

Change History (2)

by Oroku Saki, 14 years ago

Might need to switch direction of min_length / max_length, etc but it's a start.

comment:1 by Oroku Saki, 14 years ago

Resolution: invalid
Status: newclosed

Oops, I've mistaken form field docs for model field docs. This would be a nice python-level validation though, even if it's not available at the DB level.

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