Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Validate Form Element Not In Model

$
0
0
Hello there.

I'm trying to validate a form wich has an element not present in the corresponding DB table.

So, I've added it in the model (public $myfield;) and in the validating rules.
But whatever I try, when doing $model->save(), I get an error: myfield is empty. And if I dump $model->attributes, I don't see myfield.

What do I forget ?

Viewing all articles
Browse latest Browse all 18717

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>