How can I skip validation for a specific orm save on without uprooting my ORM models rules function?
I am using kohana 3.3
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Take a look into
rules()method. You can easily add custom checks, like this one:Of course, you can extend this code with custom rules for different events (insert/update etc).
PS. Also you can override
check()method and just returnTRUEwhen$this->validation_required() == TRUE. But I’d preffer to send empty rules instead (causerules()was designed specially for customize, whilecheck()is a system method).