error parameters for formatMaximum/formatMinimum, #151

master
Evgeny Poberezkin 2016-03-26 22:35:46 +00:00
parent cbd9467bd6
commit 404bff5bcf
2 changed files with 4 additions and 4 deletions

View File

@ -180,6 +180,6 @@
patternRequired: "{ missingPattern: '{{=$missingPattern}}' }", patternRequired: "{ missingPattern: '{{=$missingPattern}}' }",
switch: "{ caseIndex: {{=$caseIndex}} }", switch: "{ caseIndex: {{=$caseIndex}} }",
constant: "{}", constant: "{}",
_formatLimit: "{ limit: {{#def.schemaValueQS}} }", _formatLimit: "{ comparison: {{=$opExpr}}, limit: {{#def.schemaValueQS}}, exclusive: {{=$exclusive}} }",
_exclusiveFormatLimit: "{}" _exclusiveFormatLimit: "{}"
} #}} } #}}

View File

@ -85,15 +85,15 @@ var {{=$valid}} = undefined;
{{# def.elseIfValid }} {{# def.elseIfValid }}
{{# def.compareFormat }} {{# def.compareFormat }}
var exclusive{{=$lvl}} = {{=$schemaValueExcl}} === true; var {{=$exclusive}} = {{=$schemaValueExcl}} === true;
if ({{=$valid}} === undefined) { if ({{=$valid}} === undefined) {
{{=$valid}} = exclusive{{=$lvl}} {{=$valid}} = {{=$exclusive}}
? {{=$result}} {{=$op}} 0 ? {{=$result}} {{=$op}} 0
: {{=$result}} {{=$op}}= 0; : {{=$result}} {{=$op}}= 0;
} }
if (!{{=$valid}}) var op{{=$lvl}} = exclusive{{=$lvl}} ? '{{=$op}}' : '{{=$op}}='; if (!{{=$valid}}) var op{{=$lvl}} = {{=$exclusive}} ? '{{=$op}}' : '{{=$op}}=';
{{??}} {{??}}
{{ {{
var $exclusive = $schemaExcl === true var $exclusive = $schemaExcl === true