【发布时间】:2018-02-05 09:48:21
【问题描述】:
我正在研究一种 JSON 模式模式来排除字符串中的数字和特殊字符,这就是我现在所拥有的:
"properties": {
"applicationName": {
"description": "TPG Application Name",
"type": "string",
"pattern": "[^0-9!@#$%^&*()_+\\-=\\[\\]{};':\"\\\\|,.<>\\/?\\s\\n]"
},
这没有按预期工作,例如它不允许空格。
输入 JSON:
{
"applicationName": "TestName",
}
【问题讨论】:
-
如果我也想要空间?
-
问题出在哪里?
-
它的工作谢谢你
标签: regex json-schema-validator