Пример #1
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']];
 }
Пример #2
0
 public function rules()
 {
     return [['fizLico', 'exist', 'targetAttribute' => 'id', 'targetClass' => FizLico::className()], ['fizLico', 'required'], ['kurs', 'exist', 'targetAttribute' => 'id', 'targetClass' => Kurs::className()], ['kurs', 'required'], ['pedStazh', StazhValidator::className()], ['pedStazh', 'required'], ['stazhVDolzhnosti', StazhValidator::className()], ['stazhVDolzhnosti', 'required'], ['kategoriya', EnumValidator::className(), 'enumClass' => KategoriyaPedRabotnika::className()], ['kategoriya', 'required'], ['dolzhnostId', 'integer'], ['dolzhnostId', RequiredWhenTargetIsEmpty::className(), 'targetModel' => $this, 'targetAttribute' => 'dolzhnostNazvanie'], ['dolzhnostNazvanie', SqueezeLineFilter::className()], ['dolzhnostNazvanie', NazvanieValidator::className()], ['dolzhnostNazvanie', RequiredWhenTargetIsEmpty::className(), 'targetModel' => $this, 'targetAttribute' => 'dolzhnostId'], ['dolzhnostNazvanie', 'default'], ['obrOrgId', 'integer'], ['obrOrgId', RequiredWhenTargetIsEmpty::className(), 'targetModel' => $this, 'targetAttribute' => 'obrOrgNazvanie'], ['obrOrgNazvanie', SqueezeLineFilter::className()], ['obrOrgNazvanie', NazvanieValidator::className()], ['obrOrgNazvanie', RequiredWhenTargetIsEmpty::className(), 'targetModel' => $this, 'targetAttribute' => 'obrOrgId'], ['obrOrgNazvanie', 'default'], ['obrKvalifikaciyaId', 'integer'], ['obrKvalifikaciyaId', RequiredWhenTargetIsEmpty::className(), 'targetModel' => $this, 'targetAttribute' => 'obrKvalifikaciyaNazvanie'], ['obrKvalifikaciyaNazvanie', SqueezeLineFilter::className()], ['obrKvalifikaciyaNazvanie', NazvanieValidator::className()], ['obrKvalifikaciyaNazvanie', RequiredWhenTargetIsEmpty::className(), 'targetModel' => $this, 'targetAttribute' => 'obrKvalifikaciyaId'], ['obrKvalifikaciyaNazvanie', 'default'], ['obrDocTip', EnumValidator::className(), 'enumClass' => TipDokumentaObObrazovanii::className()], ['obrDocTip', 'required'], ['obrDocSeriya', SqueezeLineFilter::className()], ['obrDocSeriya', NomerDokumentaValidator::className()], ['obrDocSeriya', RequiredWhenTargetIsEmpty::className(), 'targetModel' => $this, 'targetAttribute' => 'obrDocNomer'], ['obrDocSeriya', 'default'], ['obrDocNomer', SqueezeLineFilter::className()], ['obrDocNomer', NomerDokumentaValidator::className()], ['obrDocNomer', RequiredWhenTargetIsEmpty::className(), 'targetModel' => $this, 'targetAttribute' => 'obrDocSeriya'], ['obrDocNomer', 'default'], ['obrDocData', 'date'], ['obrDocData', 'required'], ['pasportNomer', PasportNomerValidator::className(), 'sqlAttribute' => 'pasportNomerSql'], ['pasportNomer', 'required'], ['pasportKemVydanKod', PasportKodPodrazdeleniyaValidator::className()], ['pasportKemVydanKod', 'required'], ['pasportKemVydan', SqueezeLineFilter::className()], ['pasportKemVydan', NazvanieValidator::className()], ['pasportKemVydan', 'required'], ['pasportKogdaVydan', 'date'], ['pasportKogdaVydan', 'required'], ['propiska', SqueezeLineFilter::className()], ['propiska', NazvanieValidator::className()], ['propiska', 'required'], ['dataRozhdeniya', 'date'], ['dataRozhdeniya', 'required'], ['snils', SnilsValidator::className()], ['snils', 'required'], ['inn', InnValidator::className()], ['inn', 'required']];
 }