Opened 10 years ago

Closed 8 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: UI/UX:


The documentation at 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/, 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 Changed 10 years ago by Karen Tracey <kmtracey@…>

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 Changed 8 years ago by Alex Gaynor

Resolution: invalid
Status: newclosed

Validators of this form no longer exist.

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