#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 11 months ago.

Download all attachments as: .zip

Change History (2)

Changed 11 months ago by codefisher

comment:1 Changed 11 months ago by timgraham

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

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