mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 04:37:42 +08:00
Fixes #13932: Fix number validator attributes comparison
This commit is contained in:
committed by
Alexander Makarov
parent
cfe0bf5cf1
commit
dfe828f76b
@ -4,6 +4,7 @@ Yii Framework 2 Change Log
|
||||
2.0.16 under development
|
||||
------------------------
|
||||
|
||||
- Bug #13932: Fix number validator attributes comparison (uaoleg, s1lver)
|
||||
- Bug #14039, #16636: Fixed validation for disabled inputs (s1lver, omzy83)
|
||||
- Bug #16425: Check for additional values for disabled confirm dialog (Alex-Code, s1lver)
|
||||
- Enh #14367: In `yii\db\mysql\QueryBuilder` added support fractional seconds for time types for MySQL >= 5.6.4 (konstantin-vl)
|
||||
|
||||
@ -282,12 +282,12 @@ yii.validation = (function ($) {
|
||||
if (!$target.length) {
|
||||
$target = $form.find('[name="' + options.compareAttributeName + '"]');
|
||||
}
|
||||
compareValue = $target.val();
|
||||
compareValue = $target.val();
|
||||
}
|
||||
|
||||
if (options.type === 'number') {
|
||||
value = parseFloat(value);
|
||||
compareValue = parseFloat(compareValue);
|
||||
value = value ? parseFloat(value) : 0;
|
||||
compareValue = compareValue ? parseFloat(compareValue) : 0;
|
||||
}
|
||||
switch (options.operator) {
|
||||
case '==':
|
||||
|
||||
Reference in New Issue
Block a user