fixed inlined rules

master
Evgeny Poberezkin 2015-05-30 09:59:21 +01:00
parent 884fcfb511
commit 32e39f64a2
5 changed files with 6 additions and 6 deletions

View File

@ -4,7 +4,7 @@
? format(data)
: !format || format.test(data);
return {
var result = {
valid: valid,
errors: valid ? [] : [{
keyword: 'format',
@ -15,5 +15,5 @@
}]
};
{{??}}
return { valid: true, errors: [] };
var result = { valid: true, errors: [] };
{{?}}

View File

@ -1,7 +1,7 @@
var propertiesNum = Object.keys(data).length;
var valid = propertiesNum <= {{= it.schema.maxProperties }};
return {
var result = {
valid: valid,
errors: valid ? [] : [{
keyword: 'maxProperties',

View File

@ -1,6 +1,6 @@
var valid = data.length >= {{= it.schema.minItems }};
return {
var result = {
valid: valid,
errors: valid ? [] : [{
keyword: 'minItems',

View File

@ -1,7 +1,7 @@
var propertiesNum = Object.keys(data).length;
var valid = propertiesNum >= {{= it.schema.minProperties }};
return {
var result = {
valid: valid,
errors: valid ? [] : [{
keyword: 'minProperties',

View File

@ -1,6 +1,6 @@
{
"name": "ajv",
"version": "0.0.8",
"version": "0.0.9",
"description": "Another JSON schema Validator",
"main": "lib/ajv.js",
"scripts": {