Example: Constrained Record
A record that shows the value constraints: string length and pattern, numeric bounds, and list size.Extends · closed
| username Login name: 3–12 characters of lowercase letters, digits and `_`. | ||
| score Score from 0 to 100. | ||
| tags One to three string tags. | of | optional |
A record that shows value constraints: a username with minLength, maxLength and pattern, a score between 0 and 100, and a list of one to three tags. Scalar schemas and list schemas describe the constraint keywords.
This page describes the example/constrained type, one of the example schemas. The formal schema is attached as the schemaDefinition in this page's metadata, so the app can show it and create values of this type.
See also
Scalar schema: string and number constraints.
List schema: list size constraints.
stats: bounded integers in a real type.
Examples: every example, grouped by feature.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime
Powered by Seed HypermediaOpen App