Hello,
I wanted to reference a field label in an error message for a pattern of a string field, according to GetA12 Login.
If I do, the SME does not throw any error message at first. When I try ad hoc testing of that field, an error message is thrown. If I try to create a form model that contains such a field, instead of the form model editor, an error page is shown.
Are field references not supported in error messages of patterns?
Hi @eva-solid-surge, in error text from patterns only the field itself and its values can be referenced. Therefore, contrary to field referencing in error text of validation rules where any field can be referenced by giving the path to the respective field, in error messages of patterns only $field$ and $field.value$ are allowed parameters.
Thank you very much! Obligatory wishes: Will this be added to the documentation, and will the SME validate this when saving the field? Or did I just miss this part in the documentation?
Hey @eva-solid-surge, yes this will be added to the documentation. Thanks for bringing this issue to our attention. Concerning validation in the SME this is already happening with the SME included in A12 installer pack 2023.06-ext.1 (SME 10.1.0) and also upon typing $ only “field” and “field.value” are suggested as autocomplete options for pattern and enumeration error texts.