Skip to content

List of excluded email domains #1617

Answered by zepatrik
thomasboni asked this question in Q&A
Discussion options

You must be logged in to vote

I mean you can to that with JSONSchema by specifying something similar to:

{
  "$id": "https://schemas.ory.sh/presets/kratos/quickstart/email-password/identity.schema.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Person",
  "type": "object",
  "properties": {
    "traits": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "format": "email",
          "title": "E-Mail",
          "minLength": 3,
          "not": {
            "anyOf": [
              {
                "pattern": "@google\\.com$"
              },
              {
                "pattern": "@q-mail\\.com$"
              }
            ]
      …

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@thomasboni
Comment options

Comment options

You must be logged in to vote
1 reply
@thomasboni
Comment options

Answer selected by thomasboni
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants