Closes #13 fix timezone validation bug. Some 🍻 for @fwerner13

This commit is contained in:
Antonio Ramirez
2017-07-05 12:12:25 +02:00
parent e428b897c0
commit eeebab1b9e

View File

@ -72,7 +72,7 @@ class Profile extends ActiveRecord
'timeZoneValidation' => [
'timezone',
function ($attribute) {
if ($this->make(TimeZoneValidator::class, [$this->{$attribute}])->validate()) {
if ($this->make(TimeZoneValidator::class, [$this->{$attribute}])->validate() === false) {
$this->addError($attribute, Yii::t('usuario', 'Time zone is not valid'));
}
},