rules in public function of model don't do its job correctly


(Kipp Thomas) #1

Hi guys, I’m using following rules in model


   public function rules() {        return [[['beurteilung_fachlich', 'beurteilung_persoenlich', 'sonstiges', 'anschreiben'], 'string'],[['anschreiben'], 'string', 'max' => 255]];    }

Although threre is nowhere any restriction for attribute beurteilung_persoenlich, I will get error of formular validation:Beurteilung(fachlich) must not be longer as two hundred fifty five chars!(see my attachement,please)How can this be??What do I wrong?Is there another place reglementing formular values but in model?Database has datatype TEXT without any bondary.Here is code of formular:


<div class="col-md-6">field($model, 'beurteilung_fachlich')>widget(\dosamigos\ckeditor\CKEditor::className(), ['preset' => 'full', 'clientOptions' => ['height' => 200]])?></div>


(Smarcin777) #2

You don’t have -> behind widget.

Try remove ‘anschreiben’ from first array.