| Index: chrome/renderer/resources/json_schema.js
|
| ===================================================================
|
| --- chrome/renderer/resources/json_schema.js (revision 65777)
|
| +++ chrome/renderer/resources/json_schema.js (working copy)
|
| @@ -380,10 +380,10 @@
|
| */
|
| chromeHidden.JSONSchemaValidator.prototype.validateString = function(
|
| instance, schema, path) {
|
| - if (schema.minLength && instance.length < schema.minLength)
|
| + if ('minLength' in schema && instance.length < schema.minLength)
|
| this.addError(path, "stringMinLength", [schema.minLength]);
|
|
|
| - if (schema.maxLength && instance.length > schema.maxLength)
|
| + if ('maxLength' in schema && instance.length > schema.maxLength)
|
| this.addError(path, "stringMaxLength", [schema.maxLength]);
|
|
|
| if (schema.pattern && !schema.pattern.test(instance))
|
| @@ -405,10 +405,10 @@
|
| instance == Number.NEGATIVE_INFINITY )
|
| this.addError(path, "numberFiniteNotNan", [instance]);
|
|
|
| - if (schema.minimum && instance < schema.minimum)
|
| + if ('minimum' in schema && instance < schema.minimum)
|
| this.addError(path, "numberMinValue", [schema.minimum]);
|
|
|
| - if (schema.maximum && instance > schema.maximum)
|
| + if ('maximum' in schema && instance > schema.maximum)
|
| this.addError(path, "numberMaxValue", [schema.maximum]);
|
|
|
| if (schema.maxDecimal && instance * Math.pow(10, schema.maxDecimal) % 1)
|
|
|