diff --git a/framework/assets/yii.validation.js b/framework/assets/yii.validation.js index 69d5edf..fa9f789 100644 --- a/framework/assets/yii.validation.js +++ b/framework/assets/yii.validation.js @@ -341,9 +341,9 @@ yii.validation = (function ($) { var matches = new RegExp(options.ipParsePattern).exec(value); if (matches) { - negation = (matches[1] !== '') ? matches[1] : null; - cidr = (matches[4] !== '') ? matches[4] : null; + negation = matches[1] || null; value = matches[2]; + cidr = matches[4] || null; } if (options.subnet === true && cidr === null) {