M
M
McMike2016-11-11 09:04:30
Yii
McMike, 2016-11-11 09:04:30

How to set default value in Yii2 model?

Values ​​'' (an empty string) are pouring into the database, how to set the default value 0 at the level of the framework model for such cases?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2016-11-11
@McMike

use the default validator

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question