[Bug]: Relation custom validation error
Contact Details
No response
What happened?
I am using adminjs for my project, but when using the relation between tables together, it works, but how can I customize the error in this relation modal? In the example, I am assigning a task that this user does not have permission for. My wish is to be able to customize Error to make it more meaningful.
Bug prevalence
Add existing item relation
AdminJS dependencies version
"@adminjs/relations": "^1.1.2", "adminjs": "^7.7.2",
What browsers do you see the problem on?
No response
Relevant log output
Relevant code that's giving you issues
in all these cases I create a before handler or and after handler and manage custom errors. For instance If i have some unique check I run this check in a before and in case of error I raise a ValidationError with my own messages tied to the properties non fulfilling the unique. if error cannot be attached to any input I raise an AppError with a dedicated message.