You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I wish I could use relations within the @@Validate attribute to implement complex validations.
Describe alternatives you've considered
On discord https://discord.com/channels/1035538056146595961/1224729455696810129
jiasheng suggested me to write
@@deny('create, update', list.state!="pending")
But it seems like a workaround because i implement a data validation with an access policy
And I no longer have my custom error message.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I wish I could use relations within the @@Validate attribute to implement complex validations.
Describe the solution you'd like
Let use this model: https://zenstack.dev/docs/the-complete-guide/part1/access-policy/relations#-to-one-relations
And let's imagine a List has a state like "pending" or "open"
I would like to be able to write something like this in the Todo model: @@Validate(list.state!="pending", "You can't have a Todo for a pending list")
Describe alternatives you've considered
On discord https://discord.com/channels/1035538056146595961/1224729455696810129
jiasheng suggested me to write
@@deny('create, update', list.state!="pending")
But it seems like a workaround because i implement a data validation with an access policy
And I no longer have my custom error message.
The text was updated successfully, but these errors were encountered: