Graceful validation of fields with placeholders #1132
Labels
release/10.5.3
release/12.2.2
release/13.0.1
state/sprint-candidate
We're trying to get this in a sprint at HQ in the next few weeks
type/bug
I noticed on one our Umbraco Cloud project, a multi-site / multi-language solutions, that a contact form failed rendering on the German site, but not on other sites.
First I though it was because of the German characters in error messages like
ü
,ä
andö
, but after further investigation I found it was due a syntax error in the error message.I wonder if we could either have some regex validation here in case the validation message contains
{0
or0}
and maybe even{{0}}
?or some graceful validation, when rendering the form. E.g. log the error message, but don't fail rendering the entire form.
It could eventually just fallback to default error message or just use the raw string, so it frontend one would just see
Bitte überprüfen Sie 0}
instead of the correct messageBitte überprüfen Sie {0}
where{0}
is replaced with the actual field name.I think this is less critical as content editors sometimes make mistakes and often not familiar with
{0}
placeholder.The description below "Mandatory Error Message" and "Invalid Error Message" can eventually mention this as well, because if one deleted it, it can be difficult to know it's an option to add.
Forms v12.1.2
Umbraco v12.2.0
This item has been added to our backlog AB#36127
The text was updated successfully, but these errors were encountered: