silverstripe-framework/tests/php/Forms/FormSchemaTest/testSchemaValidation.json

147 lines
4.1 KiB
JSON
Raw Permalink Normal View History

2017-05-04 02:52:40 +02:00
{
"name": "TestForm",
"id": "Form_TestForm",
"action": null,
"method": "POST",
"attributes": {
"id": "Form_TestForm",
"action": null,
"method": "POST",
"enctype": "application\/x-www-form-urlencoded",
"target": null,
"class": ""
},
"data": [],
"fields": [
{
"name": "Name",
"id": "Form_TestForm_Name",
2017-05-09 06:42:08 +02:00
"type": "text",
"schemaType": "Text",
2017-05-04 02:52:40 +02:00
"component": null,
"holderId": "Form_TestForm_Name_Holder",
"title": "Name",
"source": null,
"extraClass": "text",
"description": null,
"rightTitle": null,
"leftTitle": null,
"readOnly": false,
"disabled": false,
2017-05-16 00:52:15 +02:00
"autoFocus": false,
2017-05-04 02:52:40 +02:00
"customValidationMessage": "",
"validation": {
"required": true,
"max": {
"length": 40
}
},
"attributes": [],
2017-12-07 21:58:52 +01:00
"data": {
"maxlength": 40
}
2017-05-04 02:52:40 +02:00
},
{
"name": "Date",
"id": "Form_TestForm_Date",
2017-05-09 06:42:08 +02:00
"type": "date",
"schemaType": "Date",
2017-05-04 02:52:40 +02:00
"component": null,
"holderId": "Form_TestForm_Date_Holder",
"title": "Date",
"source": null,
"extraClass": "date text",
"description": null,
"rightTitle": null,
"lang": "en-US",
"leftTitle": null,
"readOnly": false,
"disabled": false,
2017-05-16 00:52:15 +02:00
"autoFocus": false,
2017-05-04 02:52:40 +02:00
"customValidationMessage": "",
"validation": {
"date": true
},
"attributes": [],
"data": {
"html5": true,
"min": null,
2017-12-07 21:58:52 +01:00
"max": null,
"maxlength": null
2017-05-04 02:52:40 +02:00
}
},
{
"name": "Number",
"id": "Form_TestForm_Number",
2017-05-09 06:42:08 +02:00
"type": "number",
"schemaType": "Decimal",
2017-05-04 02:52:40 +02:00
"component": null,
"holderId": "Form_TestForm_Number_Holder",
"title": "Number",
"source": null,
"extraClass": "numeric text",
"description": null,
"rightTitle": null,
"leftTitle": null,
"readOnly": false,
"disabled": false,
2017-05-16 00:52:15 +02:00
"autoFocus": false,
2017-05-04 02:52:40 +02:00
"customValidationMessage": "",
"validation": {
"numeric": true
},
"attributes": [],
2017-12-07 21:58:52 +01:00
"data": {
"maxlength": null
}
2017-05-04 02:52:40 +02:00
},
{
"name": "Money",
"id": "Form_TestForm_Money",
2017-05-09 06:42:08 +02:00
"type": "text",
"schemaType": "Text",
2017-05-04 02:52:40 +02:00
"component": null,
"holderId": "Form_TestForm_Money_Holder",
"title": "Money",
"source": null,
"extraClass": "currency text",
"description": null,
"rightTitle": null,
"leftTitle": null,
"readOnly": false,
"disabled": false,
2017-05-16 00:52:15 +02:00
"autoFocus": false,
2017-05-04 02:52:40 +02:00
"customValidationMessage": "",
"validation": {
"currency": true
},
"attributes": [],
2017-12-07 21:58:52 +01:00
"data": {
"maxlength": null
}
2017-05-04 02:52:40 +02:00
},
{
"name": "SecurityID",
"id": "Form_TestForm_SecurityID",
2017-05-09 06:42:08 +02:00
"type": "hidden",
"schemaType": "Hidden",
2017-05-04 02:52:40 +02:00
"component": null,
"holderId": "Form_TestForm_SecurityID_Holder",
"title": "Security ID",
"source": null,
"extraClass": "hidden",
"description": null,
"rightTitle": null,
"leftTitle": null,
"readOnly": false,
"disabled": false,
2017-05-16 00:52:15 +02:00
"autoFocus": false,
2017-05-04 02:52:40 +02:00
"customValidationMessage": "",
"validation": [],
"attributes": [],
"data": []
}
],
"actions": []
2017-05-09 06:42:08 +02:00
}