Quantcast
Channel:
Viewing all articles
Browse latest Browse all 4235

Re: Aborting a save in onbeforewrite:

$
0
0

Hi BigD1214,

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...

http://www.silverstripe.org/general-questions/show/17007

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)


Posted to: Aborting a save in onbeforewrite: | Show Thread | Post Reply


Viewing all articles
Browse latest Browse all 4235

Trending Articles