-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Applies to feature/refactor.
Say you have the following in your metaJSON
{
"name" : "type",
"base-type" : "number",
"description" : "the type of product",
"required" : 1,
"minValue" : 0,
"maxValue" : 1
}and you want to perform some validation, for example in Java:
{{#minValue}}
if (newValue < {{minValue}}) {
throw new InvalidArgumentException("Number " + newValue + " is smaller than {{minValue}}.");
}
{{/minValue}}the code block is never generated. In fact mustache, due to its JavaScript nature, seems to evals an integer "0" to a boolean "false".
A possible work-around for this could be havinge pre-defined mustache keys has[Min,Max][Length,Value,Key].
Metadata
Metadata
Assignees
Labels
No labels