user=$user; parent::__construct ( $config ); } public function rules() { return [ [ 'form_of_address', 'filter', 'filter' => 'trim' ], [ 'password', 'string', 'min' => 6 ], [ 'email', 'email' ], [ ['name', 'institution', 'street_pobox', 'postal_code', 'location_city', 'country'], 'safe' ], [ 'passwordSecond', 'compare', 'compareAttribute'=>'password', 'message' => 'Verify the spelling of your password' ], //In order to recieve user input, attributes must have at least one rule. "safe" is default rule. //Possibilty to store Cites-codes in database an perfrom inline validation??? [ ['title', 'division', 'delivery_institution', 'delivery_division', 'delivery_street', 'delivery_postal_code', 'delivery_location', 'delivery_country', 'cites_code'], 'safe' ] ]; } public function attributeLabels(){ return[ 'form_of_address' => 'Form of address', 'password' => 'Password', 'passwordSecond' =>'Password (repeat)', 'title'=> 'Title', 'name' => 'Name', 'institution' =>'Institution', 'division' =>'Division', 'street_pobox' =>'Street/P.O.Box', 'postal_code' =>'Postal code', 'location_city' =>'Location/City', 'country' => 'Country', 'delivery_institution' =>'Institution', 'delivery_division' =>'Division', 'delivery_street' => 'Street', 'delivery_postal_code' =>'Postal code', 'delivery_location' => 'Location/City', 'delivery_country' => 'Country' ]; } }