Welcome Guest, Not a member yet? Register   Sign In
Validation in the Model not working
#5

(01-17-2021, 11:32 AM)iRedds Wrote:
(01-17-2021, 06:13 AM)josh2112o Wrote: Hi all,
I am trying to perform data validation in my Model class, following along with the instruction/practices mentioned in the docs here. I am getting the error: 
PHP Code:
Call to a member function setRules() on null 
 

You have overridden the model constructor.
The model constructor already defines the $db property. And you can get access to QueryBuilder by calling the $this->builder() method.
If you still need a class constructor, then call the parent's constructor.
OMG!! It works! Thanks so much!!!
Reply


Messages In This Thread
RE: Validation in the Model not working - by josh2112o - 01-17-2021, 11:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB