Closes #13 fix timezone validation bug. Some 🍻 for @fwerner13
This commit is contained in:
@ -72,7 +72,7 @@ class Profile extends ActiveRecord
|
|||||||
'timeZoneValidation' => [
|
'timeZoneValidation' => [
|
||||||
'timezone',
|
'timezone',
|
||||||
function ($attribute) {
|
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'));
|
$this->addError($attribute, Yii::t('usuario', 'Time zone is not valid'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user