Updated Validation Configuration (markdown)

2015-12-18 16:27:51 +01:00
parent d8b113fe11
commit b1aafb3c00

@@ -108,3 +108,51 @@ _(Empty cells are not checked, see not empty validation)_
If the regexp is not enough, the groovy validation should fit. The groovy expressions can use the variable value which is the String in the cell. It should return a boolean true or the String "true" to be valid, in all other cases the toString representation of the result will be the error message. That also means, that there is no i18n support for the message! If the regexp is not enough, the groovy validation should fit. The groovy expressions can use the variable value which is the String in the cell. It should return a boolean true or the String "true" to be valid, in all other cases the toString representation of the result will be the error message. That also means, that there is no i18n support for the message!
_(Empty cells are not checked, see not empty validation)_ _(Empty cells are not checked, see not empty validation)_
## Full Example
{
"headers" : {
"list": ["COLUMN WITH EXACTLY 4 DIGITS","COLUMN MAYBE EMPTY OR 1 OR 0","COLUMN MAYBE EMPTY OR DOUBLE","UNCHECKED COLUMN","NOT EMPTY AND ONE OF THE COLORS","AN INTEGER AND NOT EMPTY","SOME MANDATORY DATE","OPTIONAL DATE","EMPTY OR STRING STARTS WIDTH ID MINUS"]
},
"columns" : {
"COLUMN WITH EXACTLY 4 DIGITS": {
"integer" : true,
"not empty" : true,
"maxlength" : 4,
"minlength" : 4
},
"COLUMN MAYBE EMPTY OR 1 OR 0": {
"value of" : ["0", "1"]
},
"COLUMN MAYBE EMPTY OR DOUBLE": {
"double" : true
},
"NOT EMPTY AND ONE OF THE COLORS" : {
"not empty" : true,
"value of" : ["red","green","blue"]
},
"AN INTEGER AND NOT EMPTY" : {
"not empty" : true,
"integer" : true
},
"SOME MANDATORY DATE": {
"date" : "yyyyMMdd",
"not empty" : true
},
"OPTIONAL DATE": {
"date" : "yyyyMMdd"
},
"EMPTY OR STRING STARTS WIDTH ID MINUS" : {
"groovy" : "value.startsWith('ID-') ? true : 'NOT A CORRECT ID'"
}
}
}