6, 'max' => 25], [['fio', 'at_org', 'phone', 'fax', 'firma_full', 'u_address', 'f_address', 'member', 'member_phone', 'member_email', 'site'], 'string', 'max' => 255], [['fio', 'at_org', 'phone', 'fax', 'firma_full', 'u_address', 'f_address', 'member', 'member_phone', 'member_email'], 'safe'], ['fax', 'match', 'pattern' => '/\(?([0-9]{3})\)?([ .-]?)([0-9]{3})\2([0-9]{4})/'], ]; } public function init(){ $profile = new Profile; } public function register(){ if (!$this->validate()) { return false; } $this->clients->setAttributes( [ 'id' => $this->id, 'user_id' => $this->user_id, 'fio' => $this->fio, 'at_org' => $this->at_org, 'org_type' => $this->org_type, 'phone' => $this->phone, 'fax' => $this->fax, 'firma_full' => $this->firma_full, 'inn' => $this->inn, 'zkpo' => $this->zkpo, 'u_address' => $this->u_address, 'f_address' => $this->f_address, 'member' => $this->member, 'member_phone' => $this->member_phone, 'member_email' => $this->member_email, 'site' => $this->site, 'files' => $this->files, ] ); return $this->profile->save(); } }