Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions docs/kratos/manage-identities/15_customize-identity-schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1312,14 +1312,11 @@ You may also mix usernames and passwords:

### Advanced schema

The following identity schema includes first name, last name, a nickname, and numerical fields for the users' age. There are also
two checkboxes for specifying the newsletter subscription and enterprise customer status.

:::note

This identity schema is just an example. It contains too many fields to be used in production.

:::
The following identity schema defines personal fields for first name, last name, nickname, and age, and includes two checkboxes:
one required for accepting the terms of service and one optional for newsletter subscription.
To render links in a checkbox label, use markdown link syntax. Links open in a new tab.
To make a checkbox required, add `"const": true` to the property definition. This differs from text fields, which use the required
array.

````mdx-code-block
<Tabs>
Expand Down Expand Up @@ -1386,14 +1383,15 @@ This identity schema is just an example. It contains too many fields to be used
"type": "integer",
"title": "How old are you?"
},
"newsletter": {
"tos": {
"type": "boolean",
"title": "Newsletter subscription"
"title": "I accept the [terms of service](https://example.com/tos)",
"const": true
},
"enterprise": {
"newsletter": {
"type": "boolean",
"title": "Are you an Enterprise customer?"
}
"title": "I want to sign up for the newsletter"
},
},
"required": [
"email"
Expand Down
Loading