jsharmony-tutorials
Version:
jsHarmony Tutorials
40 lines (39 loc) • 4.69 kB
JSON
{
"table":"all_controls",
"layout":"form",
"onecolumn":true,
"caption": ["Item", "Items"],
"popup":[900,400],
"fields": [
{"name":"field1","unbound":true, "control":"textbox", "validate":["Required"], "caption":"Field 1" }, { "control":"html", "value": "(Required)" },
{"unbound":true, "control":"textbox", "validate":["MaxLength:5"], "caption":"Field 2" }, { "control":"html", "value": "(MaxLength:5)" },
{"unbound":true, "control":"textbox", "validate":["MinLength:5"], "caption":"Field 3" }, { "control":"html", "value": "(MinLength:5)" },
{"unbound":true, "control":"textbox", "validate":["IsNumeric"], "caption":"Field 4" }, { "control":"html", "value": "(IsNumeric)" },
{"unbound":true, "control":"textbox", "validate":["IsNumeric:true"], "caption":"Field 5" }, { "control":"html", "value": "(IsNumeric:true)" },
{"unbound":true, "control":"textbox", "validate":["IsDecimal"], "caption":"Field 6" }, { "control":"html", "value": "(IsDecimal)" },
{"unbound":true, "control":"textbox", "validate":["IsDecimal:3"], "caption":"Field 7" }, { "control":"html", "value": "(IsDecimal:3)" },
{"unbound":true, "control":"textbox", "validate":["IsDecimalComma:2"], "caption":"Field 8" }, { "control":"html", "value": "(IsDecimalComma:2)" },
{"unbound":true, "control":"textbox", "validate":["IsFloat"], "caption":"Field 9" }, { "control":"html", "value": "(IsFloat)" },
{"unbound":true, "control":"textbox", "validate":["IsBinary"], "caption":"Field 10" }, { "control":"html", "value": "(IsBinary)" },
{"unbound":true, "control":"textbox", "validate":["IsJSON"], "caption":"Field 11" }, { "control":"html", "value": "(IsJSON)" },
{"unbound":true, "control":"textbox", "validate":["MaxValue:999","IsFloat"], "caption":"Field 12" }, { "control":"html", "value": "(MaxValue:999)" },
{"unbound":true, "control":"textbox", "validate":["MinValue:100","IsFloat"], "caption":"Field 13" }, { "control":"html", "value": "(MinValue:100)" },
{"unbound":true, "control":"textbox", "validate":["RegEx:'/^\\\\d{4}$/','be a four digit number.'"], "caption":"Field 14" }, { "control":"html", "value": "(RegEx:'/^\\\\d{4}$/','be a four digit number.')" },
{"unbound":true, "control":"textbox", "validate":["IsEmail"], "caption":"Field 15" }, { "control":"html", "value": "(IsEmail)" },
{"unbound":true, "control":"textbox", "validate":["IsDate"], "caption":"Field 16.1" }, { "control":"html", "value": "(IsDate)" },
{"unbound":true, "control":"textbox", "validate":["IsDate:'YYYYMMDD'"], "caption":"Field 16.2" }, { "control":"html", "value": "(IsDate:'YYYYMMDD')" },
{"unbound":true, "control":"textbox", "validate":["IsSSN"], "caption":"Field 17" }, { "control":"html", "value": "(IsSSN)" },
{"unbound":true, "control":"textbox", "validate":["IsEIN"], "caption":"Field 18" }, { "control":"html", "value": "(IsEIN)" },
{"unbound":true, "control":"textbox", "validate":["MaxAge:150"], "caption":"Field 19" }, { "control":"html", "value": "(MaxAge:150)" },
{"unbound":true, "control":"textbox", "validate":["MinAge:21"], "caption":"Field 20" }, { "control":"html", "value": "(MinAge:21)" },
{"unbound":true, "control":"textbox", "validate":["IsPhone"], "caption":"Field 21" }, { "control":"html", "value": "(IsPhone)" },
{"unbound":true, "control":"textbox", "validate":["IsTime"], "caption":"Field 22.1" }, { "control":"html", "value": "(IsTime)" },
{"unbound":true, "control":"textbox", "validate":["IsTime:'HHmm'"], "caption":"Field 22.2" }, { "control":"html", "value": "(IsTime:'HHmm')" },
{"unbound":true, "control":"textbox", "validate":["Luhn"], "caption":"Field 23" }, { "control":"html", "value": "(Luhn) * Credit Card #" },
{"unbound":true, "control":"textbox", "validate":["InArray:['VALUE1','VALUE2','VALUE3']"], "caption":"Field 24" }, { "control":"html", "value": "(InArray:['VALUE1','VALUE2','VALUE3'])" },
{"unbound":true, "control":"textbox", "validate":["Equals:field1"], "caption":"Field 25" }, { "control":"html", "value": "(Equals:field1)" },
{"unbound":true, "control":"textbox", "validate":["Equals:5,'the number five'"], "caption":"Field 26" }, { "control":"html", "value": "(Equals:5,'the number five')" },
{"unbound":true, "control":"textbox", "validate":["Equals:'_obj.field1','the first field (Field 1)'"], "caption":"Field 27" }, { "control":"html", "value": "(Equals:'_obj.field1','the first field (Field 1)')" },
{"unbound":true, "control":"textbox", "validate":["Required","IsNumeric"], "caption":"Field 28" }, { "control":"html", "value": "(Required, IsNumeric) * Example with multiple validators" },
]
}