Issue on Stop insert/update operation using set up boot hook on Model #1081
-
I have set up event hook on model (boot) while record is saving, and I am validating some information from from thirdparty api, such as Valid/Exists Number Plate of vehicle. upon validating at some point i need to handle gracefully error message and stop 'saving operation' which pretty this line do ->
but on frontend it show green nice message that successfully record is saved while record flushed and discard. In there any way to stop and being not discard whole form user filled already, also user to save it again after valid registration number.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @NeguinhoAdmin You just said what it is. It is validation, So... |
Beta Was this translation helpful? Give feedback.
Hey @NeguinhoAdmin
You just said what it is. It is validation, So...
I recommend you create custom validation rule and then you are free to use it for any request in your app.