json - 如何使用 json 模式验证个人电子邮件

标签 json schema

问题是我不知道如何使用 Json Schema 验证个人电子邮件,这是什么模式?

例子@outlook.com

我已经尝试在 google 中查找,但找不到任何内容。

    "email": {
        "description": "Email of the user",
        "type": "string",
        "pattern": "",
    },

最佳答案

您可以使用 格式在 JSON Schema 中验证电子邮件。

 "email": {
    "description": "Email of the user",
    "type": "string",
    "format": "email"
}

关于json - 如何使用 json 模式验证个人电子邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57578934/

相关文章:

postgresql - 如何使用 PostgreSQL 代码片段?

json - 删除使用 oneOf(v4 或 v5)的 JSON 架构中的重复项

android - Android 类 Rails 数据库架构版本升级

javascript - 将操作添加到 DataTables JSON 特定单元格中

c# - 使用 DataContractJsonSerializer 序列化复杂字典

javascript - 如何将 JSON 日期显示到 javascript 谷歌图表

python - 自定义 simplejson 输出

wordpress - 德语特殊字符在 WordPress 架构中不起作用

ruby-on-rails - 使用 Ruby Controller 读取 Instagram JSON 并使用 HTTParty gem 传递到 View

mysql - 面向多个用户的 Django 数据库架构设计