I have model that some its field is set “not required”, let’s say user model have 3 field (login,pass, and birth date).
Login and pass are required field for user model.
And i put all 3 field in form, if i fill all the field only (login) and (pass) filed that saved to database.
While (birth date) always NULL or in MySQL its always set "01-01-1970" regardless what i fill in that field.
Just wondering why yii not save data to database that not set as "required" in model rule?
And there is any solution? except set a default value in database and set (birth date) rule to "require" so if the field is empty, the database/yii will fill it with default value.
Thank You.