Skip to content

Commit e42e841

Browse files
committed
\a is not a valid ECMA 262 regex.
Draft 2020-12 now references the ECMA 262 11.0 specification, and thereby does not allow \a. Refs: json-schema-org/json-schema-spec#821 Closes: #309
1 parent 387d690 commit e42e841

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

tests/draft-next/optional/ecmascript-regex.json

+11
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,17 @@
383383
}
384384
]
385385
},
386+
{
387+
"description": "\\a is not an ECMA 262 control escape",
388+
"schema": { "$ref": "https://json-schema.org/draft/next/schema" },
389+
"tests": [
390+
{
391+
"description": "when used as a pattern",
392+
"data": { "pattern": "\\a" },
393+
"valid": false
394+
}
395+
]
396+
},
386397
{
387398
"description": "unicode digits are more than 0 through 9",
388399
"schema": { "pattern": "^\\p{digit}+$" },

tests/draft2020-12/optional/ecmascript-regex.json

+11
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,17 @@
383383
}
384384
]
385385
},
386+
{
387+
"description": "\\a is not an ECMA 262 control escape",
388+
"schema": { "$ref": "https://json-schema.org/draft/2020-12/schema" },
389+
"tests": [
390+
{
391+
"description": "when used as a pattern",
392+
"data": { "pattern": "\\a" },
393+
"valid": false
394+
}
395+
]
396+
},
386397
{
387398
"description": "unicode digits are more than 0 through 9",
388399
"schema": { "pattern": "^\\p{digit}+$" },

0 commit comments

Comments
 (0)