- Affected version
- 2.3.0
If an entity field has
Those messages might ultimately be displayed to the user - this is not really that helpful, especially if the user just submitted a form with multiple fields.
Of course it is already possible to show better error messages to the user, but this requires custom
To improve this, it would be very useful if
This would allow developers to easily define custom, precise error messages without implemeting a verify method ever ytime.
Ideally XenForo could probably even ship additional phrases that include the field name, like
min/max/maxLength/allowedValues/match
constraints and those are not satisfied when trying to save the entity, generic error messages likeare generated.Please enter a value that matches the requirements for this field.
Those messages might ultimately be displayed to the user - this is not really that helpful, especially if the user just submitted a form with multiple fields.
Of course it is already possible to show better error messages to the user, but this requires custom
verifyXXX
methods which kinda defeats the simplicity of min/max/maxLength/allowedValues/match
To improve this, it would be very useful if
columOptions
could have additional filelds like minErrorPhrase
, maxErrorPhrase
, maxLengthErrorPhrase
, allowedValuesErrorPhrase
and matchErrorPhrase
that would be used instead of the hardcoded phrases if available.This would allow developers to easily define custom, precise error messages without implemeting a verify method ever ytime.
Ideally XenForo could probably even ship additional phrases that include the field name, like
please_enter_value_that_matches_requirements_for_field_x
so developers can just use that in case a fully customized phrase is not necessary / desired.
Last edited: