If
For example if you try to add a link forum with a URL thant is longer than 150 characters, you will get the error
So the admin does not know which field does cause the error - it could be the title (if that is long), the description or the URL.
It would be nice if the generated error could be precise, maybe by passing in the Entity as an optional parameter and build the phrase name based on the Entity shortname and fieldname (with a fallback to a default phrase if that does not exist)?
\XF\Mvc\Entity\ValueFormatter::applyValueConstraints()
is called for a column that has certain constraints (like min/max value, etc.) and the given value does not match these constraints, the generated error likeis rather unspecific.Please enter a value using {count} characters or fewer.
For example if you try to add a link forum with a URL thant is longer than 150 characters, you will get the error
Please enter a value using 150 characters or fewer.
So the admin does not know which field does cause the error - it could be the title (if that is long), the description or the URL.
It would be nice if the generated error could be precise, maybe by passing in the Entity as an optional parameter and build the phrase name based on the Entity shortname and fieldname (with a fallback to a default phrase if that does not exist)?
Upvote
1