Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#2807 closed defect (wontfix)

allow overriding default "This field is required." text

Reported by: wildfire@… Owned by: adrian
Component: Validators Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Hi,

If you create a cutom form, you can specify the isRequired property. If it is set to True and the field is not submitted, the error raised will be a (very) generic "This field is required.".

It would be useful if you could override the return validationerror somehow.

One possibility is the make isRequired a 'ready-made' validator rather than a property since all ready-made validators have an error_message that can be passed in if validation fails.

It would also remove the special-case handling of 'isRequired' and make it just another validator. Being generic can be good - especially if you get to throw in a feature for free :-)

Change History (1)

comment:1 Changed 9 years ago by adrian

  • Resolution set to wontfix
  • Status changed from new to closed

Not worth fixing this one.

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