How To Have A Required Field Without Insert It In Db?


I added a field definition in a model to have a ajax validation but I do not need to save this field in DB because this field is an array and because I not have this column in model’s DB.

My question is: how I can to show a required field in a form but without insert it in db? Otherwise an error is raised because the field does not exists.


You can unset it in beforeSave().

the problem is that I must to have each fields in the DB’s table.

My intention is to show required fields without necessarily to have the fields in DB.

Ok, I simply solved adding a $field variable in model class.