23367 Posts in 18143 Topics by 2863 members
|Go to End|
10 December 2013 at 7:49am
Is there a way to abort a save if a condition in the onbeforewrite: function is not met? Please help!
Thanks so much!
17 December 2013 at 6:28am
As there is no return type the only suggestion I would have is to use "die()" there - but that is truly awful and you must be able to fix another way... probably using a validator...
This addresses their use within ModelAdmin...
And it is [kinda] the same for a form. Only directly in the code if you create / write will there be an issue -but hey you can call validation right there (either custom or reuse any validator you create)
|Go to Top|