FeedBackForm::rules PHP 메소드

rules() 공개 메소드

public rules ( ) : array
리턴 array
    public function rules()
    {
        $module = Yii::app()->getModule('feedback');
        return [['name, email, theme, text', 'required'], ['type', 'numerical', 'integerOnly' => true], ['name, email, phone', 'length', 'max' => 150], ['theme', 'length', 'max' => 250], ['email', 'email'], ['verifyCode', 'yupe\\components\\validators\\YRequiredValidator', 'allowEmpty' => !$module->showCaptcha || Yii::app()->getUser()->isAuthenticated()], ['verifyCode', 'captcha', 'allowEmpty' => !$module->showCaptcha || Yii::app()->getUser()->isAuthenticated()]];
    }