Yii Advanced Search Form Required Fields Are Not Required

Hi, guys! I cant figure out why the fields of my advanced search form, generated with Gii CRUD generator, is not marked as required, although, the fields are marked as required in my model.

P.S.

When I generate my own advanced search form , they all are marked as required. (I get the same result as above-not required- if I used ‘except’ => ‘Search’).

You helped me a lot with the ‘except’ => ‘Search’ part of your question, because i needed to remove the asterixes and didn’t know how to do it.

have you tried replacing this one


array('id, name, content', 'safe', 'on' => 'search')

with something like this:


array('id, name, content', 'required', 'on' => 'search')

or adding required rules for the on search scenario?