mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-20 10:27:18 +08:00
Additional RangeValidator fixes
This commit is contained in:
@ -92,6 +92,11 @@ yii.validation = (function ($) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!options.allowArray && $.isArray(value)) {
|
||||||
|
pub.addMessage(messages, options.message, value);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var inArray = true;
|
var inArray = true;
|
||||||
|
|
||||||
$.each(value, function(i, v) {
|
$.each(value, function(i, v) {
|
||||||
|
@ -94,6 +94,9 @@ class RangeValidator extends Validator
|
|||||||
if ($this->skipOnEmpty) {
|
if ($this->skipOnEmpty) {
|
||||||
$options['skipOnEmpty'] = 1;
|
$options['skipOnEmpty'] = 1;
|
||||||
}
|
}
|
||||||
|
if ($this->allowArray) {
|
||||||
|
$options['allowArray'] = 1;
|
||||||
|
}
|
||||||
|
|
||||||
ValidationAsset::register($view);
|
ValidationAsset::register($view);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user