Ejemplo n.º 1
0
 public function rules()
 {
     return [[['familiya', 'imya', 'otchestvo'], SqueezeLineFilter::className()], [['familiya', 'imya', 'otchestvo'], ImyaChelovekaValidator::className()], [['familiya', 'imya'], 'required'], ['otchestvo', 'default'], ['email', 'email'], ['email', 'required'], ['telefon', TelefonValidator::className()], ['telefon', 'default'], [['rabotaOrgAdres', 'rabotaOrgVedomstvo'], 'integer'], [['rabotaOrgAdres', 'rabotaOrgVedomstvo'], 'required'], ['rabotaOrgId', 'integer'], ['rabotaOrgId', RequiredWhenTargetIsEmpty::className(), 'targetModel' => $this, 'targetAttribute' => 'rabotaOrgNazvanie'], ['rabotaOrgId', 'default'], ['rabotaOrgNazvanie', SqueezeLineFilter::className()], ['rabotaOrgNazvanie', NazvanieValidator::className()], ['rabotaOrgNazvanie', RequiredWhenTargetIsEmpty::className(), 'targetModel' => $this, 'targetAttribute' => 'rabotaOrgId'], ['rabotaOrgNazvanie', 'default'], ['rabotaDolzhnostId', 'integer'], ['rabotaDolzhnostId', RequiredWhenTargetIsEmpty::className(), 'targetModel' => $this, 'targetAttribute' => 'rabotaDolzhnostNazvanie'], ['rabotaDolzhnostId', 'default'], ['rabotaDolzhnostNazvanie', SqueezeLineFilter::className()], ['rabotaDolzhnostNazvanie', NazvanieValidator::className()], ['rabotaDolzhnostNazvanie', RequiredWhenTargetIsEmpty::className(), 'targetModel' => $this, 'targetAttribute' => 'rabotaDolzhnostId'], ['rabotaDolzhnostNazvanie', 'default'], ['rabotaEtapObrazovaniya', EnumValidator::className(), 'enumClass' => EtapObrazovaniya::className()], ['rabotaEtapObrazovaniya', 'default'], ['rabotaTelefon', TelefonValidator::className()], ['rabotaTelefon', 'default'], ['login', LoginFilter::className()], ['login', LoginValidator::className()], ['login', 'unique', 'targetClass' => Polzovatel::className(), 'targetAttribute' => 'login'], ['login', 'required'], ['podtverzhdenieParolya', 'compare', 'compareAttribute' => 'parol', 'message' => 'Пароль должен совпадать с подтверждением пароля.'], [['parol', 'podtverzhdenieParolya'], 'required'], [['roli'], 'required']];
 }
Ejemplo n.º 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']];
 }