Use anything as a rule and $this->some_model issue |
I'm trying to perform form validation from within a specific method ('my_user_model', in fact I'm extending on Lonnie Ezell's MY_Model using 'in model' validation), but I'm getting issues with custom validation rules. Callbacks didn't work because the callback could not be found in 'my_user_model'...
So I've gone through the new user guide, where I read about 'use-anything-as-a-rule' in the form_validation user guide. But when I try to validate a field in my controller in this way: PHP Code: $this->form_validation->set_rules('birthdate', 'Birthdate', I'm getting a parse error on '$this' : "syntax error, unexpected '$this' (T_VARIABLE), expecting ')'" Does somebody has experience with this new extension ('Use anything as a rule')? Thanks! |
Messages In This Thread |
Use anything as a rule and $this->some_model issue - by Zeff - 01-31-2018, 07:56 AM
RE: Use anything as a rule and $this->some_model issue - by Elias - 01-31-2018, 08:24 AM
RE: Use anything as a rule and $this->some_model issue - by skunkbad - 01-31-2018, 05:56 PM
RE: Use anything as a rule and $this->some_model issue - by Zeff - 02-01-2018, 03:39 AM
RE: Use anything as a rule and $this->some_model issue - by Zeff - 02-02-2018, 05:40 AM
RE: Use anything as a rule and $this->some_model issue - by jreklund - 02-02-2018, 06:33 AM
RE: Use anything as a rule and $this->some_model issue - by Zeff - 02-02-2018, 06:51 AM
RE: Use anything as a rule and $this->some_model issue - by b126 - 02-21-2019, 04:02 AM
RE: Use anything as a rule and $this->some_model issue - by InsiteFX - 02-21-2019, 09:14 AM
|