Browse Source

Fixed client-side IP validator

tags/2.0.7
Andrey Klochok 9 years ago
parent
commit
4a0d7b3676
  1. 4
      framework/assets/yii.validation.js

4
framework/assets/yii.validation.js

@ -341,9 +341,9 @@ yii.validation = (function ($) {
var matches = new RegExp(options.ipParsePattern).exec(value); var matches = new RegExp(options.ipParsePattern).exec(value);
if (matches) { if (matches) {
negation = (matches[1] !== '') ? matches[1] : null; negation = matches[1] || null;
cidr = (matches[4] !== '') ? matches[4] : null;
value = matches[2]; value = matches[2];
cidr = matches[4] || null;
} }
if (options.subnet === true && cidr === null) { if (options.subnet === true && cidr === null) {

Loading…
Cancel
Save