spicywebau / craft-fieldlabels

Override Craft CMS field labels and instructions in the field layout designer
MIT License
123 stars 9 forks source link

Replace error message default value with field label's value #29

Closed RobErskine closed 5 years ago

RobErskine commented 5 years ago

First off, thank you so much for this plugin. It's amazing!

Description

When a required field that has been relabeled is not filled out and a user attempts to save the element, the default field name shows up as the error message. In the example below I have a field called "Plaintext" that I use over and over again for simple input, but use Fieldlabels to make it more appropriate for the user. When attempting to save the entry with the field empty, I see the default "Plaintext cannot be blank" instead of "Subject cannot be blank".

plaintext cannot be blank

Steps to reproduce

  1. Create a plaintext field and make it required (i'm sure this works with all required fields without default values as well)
  2. Attempt to save the element while the field is empty
  3. Observe the default error message

Other information

EDIT: Super sorry, I should have checked the closed issues first. It seems like this was reported back in 2017 with #11. Not sure if it's 100% the same or not, but if it is feel free to close.