title: cakephp: how to set multiple validation in model for different actions?
body: <p>I have a user model. In it, I have set validations that are used while registering user. That works fine. But when user edits his profile information, I don't want to validate some fields like password, email, etc. How it is possible. Below is code.</p>
  
  <pre><code>&lt;?php
  class User extends AppModel{
  
      var $name = 'User';
  
      // used when user registers
      var $validate = array(
  
          'login' =&gt; array(
              'minLength' =&gt; array(
                  'rule' =&gt; array('minLength', '6'),
                  'field' =&gt; 'login', 
                  'message' =&gt; 'mimimum 6 characters long'
                  )
          ),
          'password' =&gt; array( // don't want to validate in edit profile page
              'minLength' =&gt; array(
                  'rule' =&gt; array('minLength', '6'),
                  'field' =&gt; 'password',
                  'message' =&gt; 'minimum 6 characters long'
                  )
          ),
          'email' =&gt; array(
              array(
              'rule' =&gt; 'email',
              'message' =&gt; 'please enter a valid email address'
              )
          )
      );
  ?&gt;
  </code></pre>
  
  <p>Above is used when I register a user. But when user edits his profile, I don't allow to edit/change user password. So each time while editing profile, it checks for password validation. I haven't added password field in edit profile page, I don't want to validate password field. So can I have different validation rules for different actions?</p>
  
  <p>Thanks.</p>