document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <?php
  2.     /**
  3.      * @return array validation rules for model attributes.
  4.      */
  5.     public function rules()
  6.     {
  7.         // NOTE: you should only define rules for those attributes that
  8.         // will receive user inputs.
  9.         return array(
  10.             // hozzaadott szabalyaink
  11.             array( \'title\', \'required\', \'message\' => \'Ejnye! Cím nem lehet üres!\' ),
  12.             array( \'title\', \'unique\' ),
  13.             array(\'title\',
  14.                     \'match\',
  15.                     \'pattern\'=>\'/^[A-Za-z0-9_]+$/\',
  16.                     \'message\' => \'Jajj! Csak számokat, betűket és `_` jelet használhatsz! Bocsi\' ),
  17.             // eddig ...
  18.             array(\'revision, created\', \'numerical\', \'integerOnly\'=>true),
  19.             array(\'title\', \'length\', \'max\'=>125),
  20.             array(\'body\', \'safe\'),
  21.             // The following rule is used by search().
  22.             // Please remove those attributes that should not be searched.
  23.             array(\'id, title, body, revision, created\', \'safe\', \'on\'=>\'search\'),
  24.         );
  25.     }
');