Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9003567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:43:42+00:00 2026-06-16T00:43:42+00:00

How can I skip validation for a specific orm save on without uprooting my

  • 0

How can I skip validation for a specific orm save on without uprooting my ORM models rules function?

I am using kohana 3.3

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:43:43+00:00Added an answer on June 16, 2026 at 12:43 am

    Take a look into rules() method. You can easily add custom checks, like this one:

    // required by default
    protected $_validation_required = TRUE;
    
    public function rules()
    {
        if ($this->validation_required())
        {
             // return all model rules
             return array(
                  // default rules here
             );
             // or 
             // if extending model with existing rules
             return parent::rules(); 
        }
        else
        {
             // skip validation 
             return array();
        }
    }
    
    public function validation_required($required = TRUE)
    {
         if ($required === NULL)
         {
               // work as getter
               return $this->_validation_required;
         }
    
         // set value
         $this->_validation_required = (bool)$required;
         return $this;
    }
    

    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 return TRUE when $this->validation_required() == TRUE. But I’d preffer to send empty rules instead (cause rules() was designed specially for customize, while check() is a system method).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can i skip first argument without giving any value in function call,so that
How can I skip over a loop using pdb.set_trace() ? For example, pdb.set_trace() for
I am validating form using jquery validation plugin...... rules: { Name: required, MobileNo: {
You can skip to the bottom line if you don't care about the background:
In ELisp, you can skip the evaluation of a definition with the autoload cookie.
How can I skip the unit and integration tests in Grails when building? I
if ConvertAll throw an exception on one element, can i just skip this element
If my Ajax requests set a X-Requested-With header, can I just skip the CSRF
Can I check if the update value is N , then skip this field?
I am using a few page validation tools one problem i have is they

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.