Callback::rules PHP 메소드

rules() 공개 메소드

public rules ( ) : array
리턴 array
    public function rules()
    {
        return [['name, phone', 'required'], ['name, comment', 'filter', 'filter' => 'trim'], ['name', 'length', 'max' => 30], ['time', 'length', 'max' => 5], ['time', 'match', 'pattern' => '/^([0-1][0-9]|[2][0-3]):([0-5][0-9])$/', 'message' => Yii::t('CallbackModule.callback', 'Incorrect time value')], ['phone', 'match', 'pattern' => Yii::app()->getModule('callback')->phonePattern, 'message' => Yii::t('CallbackModule.callback', 'Incorrect phone value')], ['comment', 'length', 'max' => 255], ['status', 'numerical', 'integerOnly' => true], ['id, name, phone, time, comment, status, create_time', 'safe', 'on' => 'search']];
    }