Skip to content

Commit

Permalink
turn integers to strings for client validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Faryshta committed Nov 28, 2015
1 parent 9e55d9e commit 80c2682
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion validators/EnumValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function clientValidateAttribute($model, $attribute, $view)
$this->ensureEnum($model, $attribute);

$options = [
'range' => array_keys($this->enum),
'range' => array_map('strval', array_keys($this->enum)),
'not' => false,
'message' => Yii::$app->getI18n()->format($this->message, [
'attribute' => $model->getAttributeLabel($attribute),
Expand Down

0 comments on commit 80c2682

Please sign in to comment.