[UNLIKELY] Use field label instead of name in validation message summary


We have some fields where the underlying name is quite different to the display name which has led to a bit of confusion when the validation message is being shown to users that do not know what the underlying field name is. Below is an example screenshot showing what I mean:

From looking at the code this is because it is using the field’s path so doesn’t appear to be a trivial change. I then added the nested field (i.e. Array) to my example as I realised that’s probably why having the whole path is quite important, along with an example of two fields that share the same label.

This error message seems to be specifically when making use of the ‘Required on Publish’ validation, when using the ‘Required’ validation there is a less specific general message with the field specific message appearing against each field. Just mentioning in case you feel it is easier or more consistent to just use this validation messaging for all scenarios, however I do like having the validation summary mentioning specific fields, especially when you have a lot of them.

Having said all that I realise I have essentially argued against my own feature request!

Guess best bet for now is to instead push for the underlying field name to be changed to more accurately reflect the label the user sees? We’re not live yet so shouldn’t be that risky or onerous to do.

Best regards,

There are several topics:

  1. Consistency between server side and client side error messages.
  2. Having an error message shown at the right place.

In general it would be best if you would not see the error message at all and just see the specific message next to the actual field. I am not sure why this does not work.

When it would work perfectly the best solution would be not to show a label in the error message at all, because it is just noise.

I just tested it again. Backend errors are shown properly. So I am not sure what to change here.

Thanks for your responses.

Feel free to close as I do not have a clear idea of what I would want to see after remembering multiple fields can share the same Label.

In summary my original request could have been “Use Labels instead of Names in server side validation messages on the UI”. I realised the server side validation would also be returned by the API where I would prefer the Name/Path to be used instead of the Label, so it would need to be that when using Squidex UI those Paths in the error message somehow get resolved into the field Labels. Seems more effort than it is worth!

For now I will workaround by changing the underlying Name of the fields so that they match the Label the user sees. Just hope they don’t want to change the labels anytime soon!