Welcome Guest, Not a member yet? Register   Sign In
Custom Validation Rule in Model
#3

(01-22-2021, 02:23 PM)iRedds Wrote: I didn't fully understand your problem.
You can override the validate() method of the model to include your library.
Or add a method with your library to the beforeInsert/udpate/delete events.
Hi,
Thanks for your response...

I was hoping to use the validation functionality in the model itself instead of the Controller. I have written some validation rules for controller but want to write and use some for use in the model along with those built-in validations (E.g., required|in_list etc).

How do I add a method from my library to the beforeInsert/udpate/delete events?

Thanks for your help.
Reply


Messages In This Thread
Custom Validation Rule in Model - by josh2112o - 01-22-2021, 03:28 AM
RE: Custom Validation Rule in Model - by iRedds - 01-22-2021, 02:23 PM
RE: Custom Validation Rule in Model - by josh2112o - 01-22-2021, 04:08 PM
RE: Custom Validation Rule in Model - by iRedds - 01-22-2021, 05:26 PM
RE: Custom Validation Rule in Model - by iRedds - 01-22-2021, 09:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB