You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
88 lines
2.9 KiB
88 lines
2.9 KiB
{
|
|
"title": "Validation example",
|
|
"forms": [
|
|
{
|
|
"name": "validate",
|
|
"title": "Validated form",
|
|
"description": "This form is heavily validated",
|
|
"submit_title": "Validate it",
|
|
"script": "job_validate.sh",
|
|
"fields": [
|
|
{
|
|
"name": "string",
|
|
"title": "A string of at least 5 and at most 7 characters.",
|
|
"type": "string",
|
|
"required": true,
|
|
"minlen": 5,
|
|
"maxlen": 7
|
|
},
|
|
{
|
|
"name": "string_nr",
|
|
"title": "A non-required string of at least 5 and at most 7 characters.",
|
|
"type": "string",
|
|
"minlen": 5,
|
|
"maxlen": 7
|
|
},
|
|
{
|
|
"name": "integer",
|
|
"title": "An integer (min 10, max 20)",
|
|
"type": "integer",
|
|
"required": true,
|
|
"min": 10,
|
|
"max": 20
|
|
},
|
|
{
|
|
"name": "float",
|
|
"title": "A real number (min 0.5, max 1.0)",
|
|
"type": "float",
|
|
"required": true,
|
|
"min": 0.5,
|
|
"max": 1.0
|
|
},
|
|
{
|
|
"name": "date",
|
|
"title": "A date (in the month 2015-01)",
|
|
"type": "date",
|
|
"required": true,
|
|
"min": "2015-01-01",
|
|
"max": "2015-02-01"
|
|
},
|
|
{
|
|
"name": "radio",
|
|
"title": "A radio",
|
|
"type": "radio",
|
|
"required": true,
|
|
"options": [
|
|
["One", "one"],
|
|
["Two", "two"],
|
|
["Three", "three"]
|
|
]
|
|
},
|
|
{
|
|
"name": "text",
|
|
"title": "A text input field (min 10 chars, max 100 chars)",
|
|
"type": "text",
|
|
"required": true,
|
|
"rows": 2,
|
|
"cols": 50,
|
|
"maxlen": 100,
|
|
"minlen": 10
|
|
},
|
|
{
|
|
"name": "password",
|
|
"title": "A password input field of at least 5 chars",
|
|
"type": "password",
|
|
"required": true,
|
|
"minlen": 5
|
|
},
|
|
{
|
|
"name": "file",
|
|
"title": "A file upload field",
|
|
"type": "file",
|
|
"required": true,
|
|
"extensions": ["csv"]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
|