Opened 17 years ago

Closed 15 years ago

#7486 closed (invalid)

IsLessThanOtherField's third argument is required, but documented as optional

Reported by: slinkp@… Owned by: nobody
Component: contrib.admin Version: 0.96
Severity: Keywords:
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The documentation at http://www.djangoproject.com/documentation/0.96/forms/#validators says:
"Each of the standard validators that take parameters have an optional final argument (error_message) that is the message returned when validation fails. If no message is passed in, a default message is used."

But in django/core/validators.py, we can see that both IsLessThanOtherField and UniqueAmongstFieldsWithPrefix do not have default values for error_message.

For consistency, I think we should say the docs are correct and the code should be fixed to match.

Change History (2)

comment:1 by Karen Tracey <kmtracey@…>, 16 years ago

Triage Stage: UnreviewedDesign decision needed

I don't believe the old validator code will be fixed at this point. Ticket #6845 is handling addition of validation to the newforms/ModelForm approach. If this problem is still applicable in the patch for that ticket, then the problem should be brought up in the context of that work.

I believe this should be closed wontfix but that's supposed to be done by a core dev so I'll just change it to Design Decision Needed and hopefully a core dev will see it and change status as appropriate.

comment:2 by Alex Gaynor, 15 years ago

Resolution: invalid
Status: newclosed

Validators of this form no longer exist.

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