Пример #1
0
 public function rules()
 {
     return [['god', 'integer', 'min' => 2015, 'max' => 2020], ['tip', Enum2Validator::className(), 'enum' => TipKursa::className()], ['nazvanie', 'string', 'max' => '400'], ['rukovoditelId', 'integer'], [['dateStart', 'dateEnd'], 'date'], [['chasyStart', 'chasyEnd'], 'integer']];
 }
Пример #2
0
 /**
  * @inheritdoc
  */
 public function rules()
 {
     return [['data', 'date', 'format' => 'yyyy-MM-dd'], ['nomer', 'in', 'range' => range(1, Day::$zanyatiyaMax)], ['prepodavatel', 'integer'], ['auditoriya_id', 'integer'], ['auditoriya_nazvanie', NazvanieValidator::className()], ['forma', Enum2Validator::className(), 'enum' => FormaZanyatiya::className()]];
 }
Пример #3
0
 public function rules()
 {
     return [['kategorii_slushatelej', 'required'], ['kategorii_slushatelej', 'each', 'rule' => ['integer', 'min' => 1]], ['kategorii_slushatelej_input', 'filter', 'filter' => $this->emptyRemover()], ['kategorii_slushatelej_input', 'each', 'rule' => [SqueezeLineFilter::className()]], ['kategorii_slushatelej_input', 'each', 'rule' => [NazvanieValidator::className()]], ['nazvanie', 'required'], ['nazvanie', SqueezeLineFilter::className()], ['nazvanie', NazvanieValidator::className()], ['annotaciya', SqueezeTextFilter::className()], ['annotaciya', 'default'], ['raschitano_chasov', 'required'], ['raschitano_chasov', ChasyObucheniyaValidator::className()], ['formy_obucheniya_widget', 'each', 'rule' => [Enum2Validator::className(), 'enum' => FormaObucheniya::className()]], ['formy_obucheniya_widget', 'default'], ['ochnoe_nachalo', DateValidator::className(), 'timestampAttribute' => 'ochnoe_nachalo'], ['ochnoe_konec', DateValidator::className(), 'timestampAttribute' => 'ochnoe_konec'], ['zaochnoe_nachalo', DateValidator::className(), 'timestampAttribute' => 'zaochnoe_nachalo'], ['zaochnoe_konec', DateValidator::className(), 'timestampAttribute' => 'zaochnoe_konec'], [['ochnoe_nachalo', 'ochnoe_konec', 'zaochnoe_nachalo', 'zaochnoe_konec'], 'default'], ['raschitano_slushatelej', 'integer', 'min' => 0], ['raschitano_slushatelej', 'default'], ['rukovoditel', 'exist', 'targetClass' => FizLico::className(), 'targetAttribute' => 'id'], ['rukovoditel', 'default'], ['finansirovanie', 'required'], ['finansirovanie', Enum2Validator::className(), 'enum' => TipFinansirovaniya::className()], ['tip', 'required'], ['tip', Enum2Validator::className(), 'enum' => TipKursa::className()], ['plan_prospekt_god', 'required'], ['plan_prospekt_god', 'in', 'range' => ['2015-01-01', '2016-01-01', '2017-01-01', '2018-01-01']], ['iup', 'boolean'], ['iup', 'default', 'value' => false]];
 }