-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dac6b4e
commit dd4b1ba
Showing
1 changed file
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ | ||
"jsonSchema": { | ||
"type": "object", | ||
"title": "Comment", | ||
"properties": { | ||
"user": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"title": "Name", | ||
"type": "string" | ||
}, | ||
"lastname": { | ||
"title": "Last Name (with description)", | ||
"type": "string", | ||
"description": "Hint: this is the last name" | ||
}, | ||
"firstname": { | ||
"title": "First Name (with placeholder)", | ||
"type": "string" | ||
}, | ||
"age": { | ||
"title": "Age", | ||
"type": "number" | ||
} | ||
} | ||
}, | ||
"nochange": { | ||
"title": "Field (read only mode)", | ||
"type": "string" | ||
}, | ||
"email": { | ||
"title": "Email (with pattern validation and custom validation message)", | ||
"type": "string", | ||
"pattern": "^\\S+@\\S+$", | ||
"description": "Email will be used for evil.", | ||
"validationMessage": "Please enter a valid email address, e.g. [email protected]" | ||
}, | ||
"comment": { | ||
"title": "Comment", | ||
"type": "string", | ||
"maxLength": 20, | ||
"validationMessage": "Don't be greedy!" | ||
} | ||
}, | ||
"required": [ | ||
"name", | ||
"firstname", | ||
"email", | ||
"comment" | ||
] | ||
}, | ||
"uiSchema": [ | ||
"user.name", | ||
"user.lastname", | ||
{ | ||
"key": "user.firstname", | ||
"type": "text", | ||
"placeholder": "Enter your firstname here" | ||
}, | ||
"user.age", | ||
"email", | ||
{ | ||
"key": "nochange", | ||
"type": "text", | ||
"readOnly": true | ||
}, | ||
{ | ||
"key": "comment", | ||
"type": "textarea", | ||
"placeholder": "Make a comment" | ||
} | ||
], | ||
"properties": { | ||
"user": { | ||
"name": "Chuck Norris" | ||
}, | ||
"nochange": "You can't change that", | ||
"email": "[email protected]", | ||
"comment": "lol" | ||
} | ||
} |