yii Unique Validator
/**
* @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(
........
array('username','unique'),
........
);
}
Comments
Post a Comment
silahkan berkomentar, kritik dan saran yang membangun adalah harapkan kita semua !