diff --git a/docs/kratos/manage-identities/15_customize-identity-schema.mdx b/docs/kratos/manage-identities/15_customize-identity-schema.mdx index c7764a9bb..bcddea3d7 100644 --- a/docs/kratos/manage-identities/15_customize-identity-schema.mdx +++ b/docs/kratos/manage-identities/15_customize-identity-schema.mdx @@ -205,6 +205,43 @@ their GitHub handle, which is clear thanks to the field description defined in t ```` +## Restrict values with `enum` + +Use the JSON Schema `enum` keyword to restrict a trait to a fixed set of allowed values. When you declare an `enum` on a string +property, the Ory Account Experience renders the field as a dropdown (a native ``; UIs that do not look at `options` +fall back to a plain text input, so the change is backward compatible with older custom UIs. + +:::note + +Only top-level string properties under `traits` are supported. The rendered option value is used as both the submitted value and +the visible label. + +::: + ## Identity schema extensions Because the system doesn't know which fields have system-relevant meaning, you have to specify that in the schema. For example: