But no plans for the future? I'd hate to implement something that will be included in the near future
Anywhere I can look for examples on how to implement?
form validation for unique fields
Collapse
X
-
It was considered before.
For now, I suggest to add to call an additional check in before create/save record hook and throw a Conflict exception with a message body. We've done it multiple time. -
-
It's not a bug. We don't have such a feature currently. It needs to be handled manaully (in a hook or a wrapper).Leave a comment:
-
form validation for unique fields
Steps to Reproduce:- Attempt to create or update any record in EspoCRM with a value that violates a unique constraint (e.g., duplicate number, email, or other unique field).
- Submit the form.
Expected Behavior:- The form should display a validation error indicating which field violates the uniqueness constraint.
Actual Behavior:- Submission fails with a 500 error instead of a user-friendly validation message.
- Example error in log:
Environment:- EspoCRM version: 9.1.8
- PHP version: 8.3
- Database: maria db
Tags: None

Leave a comment: