title: Confusion with validation rules in Yii framework
body: <p>I am new to Yii framework &amp; having some confusion regarding validation rules which are written inside model. For ex:<br>
  array('email','safe'),<br>
  array('username, password', 'required', 'on'=>'login, register'),<br></p>
  
  <p>1- what is the use of <strong>safe</strong> validator &amp; where to use it?<br>
  2- what is the use of <strong>on</strong> scenario and how to use it? Suppose I have wriiten <strong>'on'=>'register'</strong>, then whether 'register' is action name or anything else.</p>
  
  <p>Even after going through lots of document, still it is not very clear for me. Can someone explain it with example.</p>