Exemple #1
0
 public function rules()
 {
     return [['tip', 'in', 'range' => TipKursa::items()], ['tip', 'default'], ['kategorii_slushatelej', 'each', 'rule' => ['integer']], ['kategorii_slushatelej', 'default'], ['nazvanie', 'filter', 'filter' => 'mb_strtolower'], ['nazvanie', SqueezeLineFilter::className()], ['nazvanie', NazvanieValidator::className()], ['nazvanie', 'default'], ['rukovoditel', 'integer'], ['rukovoditel', 'default'], ['raschitano_chasov', ChasyObucheniyaValidator::className()], ['raschitano_chasov', 'default'], ['nachnutsya_posle', DateValidator::className(), 'timestampAttribute' => 'nachnutsya_posle'], ['nachnutsya_posle', 'default'], ['zakonchatsya_do', DateValidator::className(), 'timestampAttribute' => 'zakonchatsya_do'], ['zakonchatsya_do', 'default']];
 }
Exemple #2
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]];
 }
Exemple #3
0
 public function rules()
 {
     return [['familiya', ImyaChelovekaValidator::className()], ['familiya', 'required'], ['imya', ImyaChelovekaValidator::className()], ['imya', 'required'], ['otchestvo', ImyaChelovekaValidator::className()], ['otchestvo', 'default'], ['data_rozhdeniya', DateValidator::className(), 'sqlAttribute' => 'data_rozhdeniya'], ['data_rozhdeniya', 'required'], ['telefon', TelefonValidator::className(), 'sqlAttribute' => 'telefon'], ['telefon', 'required'], ['email', EmailValidator::className()], ['email', 'required'], ['pasport_no', PasportNomerValidator::className(), 'sqlAttribute' => 'pasport_no'], ['pasport_no', 'required'], ['pasport_kem_vydan_kod', PasportKodPodrazdeleniyaValidator::className(), 'sqlAttribute' => 'pasport_kem_vydan_kod'], ['pasport_kem_vydan_kod', 'required'], ['pasport_kem_vydan', NazvanieValidator::className()], ['pasport_kem_vydan', 'required'], ['pasport_kogda_vydan', DateValidator::className(), 'sqlAttribute' => 'pasport_kogda_vydan'], ['pasport_kogda_vydan', 'required'], ['inn', InnValidator::className(), 'sqlAttribute' => 'inn'], ['inn', 'required'], ['snils', SnilsValidator::className(), 'sqlAttribute' => 'snils'], ['snils', 'required'], ['propiska', 'required'], ['propiska', 'string']];
 }
Exemple #4
0
 public function rules()
 {
     return [['dokument_ob_obrazovanii_tip', EnumValidator::className(), 'enumClass' => TipDokumentaObObrazovanii::className()], ['dokument_ob_obrazovanii_tip', 'required'], ['dokument_ob_obrazovanii_seriya', NomerDokumentaValidator::className()], ['dokument_ob_obrazovanii_seriya', 'default'], ['dokument_ob_obrazovanii_nomer', NomerDokumentaValidator::className()], ['dokument_ob_obrazovanii_nomer', 'required'], ['dokument_ob_obrazovanii_data', DateValidator::className(), 'sqlAttribute' => 'dokument_ob_obrazovanii_data'], ['dokument_ob_obrazovanii_data', 'default'], ['kvalifikaciyaDir', ComboValidator::className(), 'directoryAttribute' => 'kvalifikaciyaDir', 'required' => true], ['organizaciyaDir', ComboValidator::className(), 'directoryAttribute' => 'organizaciyaDir', 'required' => true], ['kurs_tip', EnumValidator::className(), 'enumClass' => TipKursa::className()], ['kurs_tip', 'default'], ['kurs_nazvanie', NazvanieValidator::className()], ['kurs_nazvanie', 'default'], ['kurs_chasy', ChasyObucheniyaValidator::className()], ['kurs_chasy', 'default']];
 }