Opened 10 years ago

Closed 10 years ago

#23345 closed New feature (wontfix)

Better message for required fileds in form validation

Reported by: codefisher Owned by: nobody
Component: Forms Version: 1.6
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When a required field fails validation is says "This field is required". I think it should say something more like "Subject is required", assuming the label of the field is "Subject". It in my opinion is more user friendly.

I know this can be done by changing the error_messages argument/variable. But that means doing it for possibly hundreds of fields.

I will attach a patch, hope I get it right, it will be the first time ever I have posted a patch.

Attachments (1)

patch.txt (1.1 KB ) - added by codefisher 10 years ago.

Download all attachments as: .zip

Change History (2)

by codefisher, 10 years ago

Attachment: patch.txt added

comment:1 by Tim Graham, 10 years ago

Resolution: wontfix
Status: newclosed

Thanks for the suggestion, but there are backwards compatibility concerns. Everyone using error_messages['required'] key would need to start passing 'label' in params. I don't think the gains outweigh the drawbacks.

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