UNPKG

angular2-json-schema-form

Version:
66 lines (65 loc) 1.24 kB
{ "schema": { "type": "object", "title": "Comment", "properties": { "name": { "title": "Name", "type": "string" }, "email": { "title": "Email", "type": "string", "pattern": "^\\S+@\\S+$", "description": "Email will be used for evil." }, "comment": { "title": "Comment", "type": "string", "maxLength": 20, "validationMessage": "Don't be greedy!" } }, "required": [ "name", "email", "comment" ] }, "form": [ { "type": "help", "helpvalue": "<div class=\"alert alert-info\">Grid it up with bootstrap</div>" }, { "type": "section", "htmlClass": "row", "items": [ { "type": "section", "htmlClass": "col-xs-6", "items": [ "name" ] }, { "type": "section", "htmlClass": "col-xs-6", "items": [ "email" ] } ] }, { "key": "comment", "type": "textarea", "placeholder": "Make a comment" }, { "type": "submit", "style": "btn-info", "title": "OK" } ] }