mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-15 13:58:24 +08:00
Fixes checking for $.inArray() result in docs [skip ci]
See http://stackoverflow.com/questions/5304458/jquery-inarray-only-looking-at-first-value
This commit is contained in:
committed by
Alexander Makarov
parent
fb59d304f5
commit
8a3babc9ef
@@ -544,7 +544,7 @@ class StatusValidator extends Validator
|
||||
$statuses = json_encode(Status::find()->select('id')->asArray()->column());
|
||||
$message = json_encode($this->message, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
|
||||
return <<<JS
|
||||
if (!$.inArray(value, $statuses)) {
|
||||
if ($.inArray(value, $statuses) > -1) {
|
||||
messages.push($message);
|
||||
}
|
||||
JS;
|
||||
|
||||
Reference in New Issue
Block a user