<?php
/**
* @return array validation rules for model attributes.
*/
public function rules()
{
// NOTE: you should only define rules for those attributes that
// will receive user inputs.
return array(
// hozzaadott szabalyaink
array( \'title\', \'required\', \'message\' => \'Ejnye! Cím nem lehet üres!\' ),
array( \'title\', \'unique\' ),
array(\'title\',
\'match\',
\'pattern\'=>\'/^[A-Za-z0-9_]+$/\',
\'message\' => \'Jajj! Csak számokat, betűket és `_` jelet használhatsz! Bocsi\' ),
// eddig ...
array(\'revision, created\', \'numerical\', \'integerOnly\'=>true),
array(\'title\', \'length\', \'max\'=>125),
array(\'body\', \'safe\'),
// The following rule is used by search().
// Please remove those attributes that should not be searched.
array(\'id, title, body, revision, created\', \'safe\', \'on\'=>\'search\'),
);
}