Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refer to core regex section from patternProperties and pattern #1547

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions specs/jsonschema-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -1682,9 +1682,8 @@ The presence of this keyword affects the behaviors of
##### `patternProperties`

The value of `patternProperties` MUST be an object. Each property name of this
object SHOULD be a valid regular expression, according to the ECMA-262 regular
expression dialect. Each property value of this object MUST be a valid JSON
Schema.
object SHOULD be a valid regular expression as indicated in {{regex}}. Each
property value of this object MUST be a valid JSON Schema.

Validation succeeds if, for each instance name that matches any regular
expressions that appear as a property name in this keyword's value, the child
Expand Down
4 changes: 3 additions & 1 deletion specs/jsonschema-validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ Omitting this keyword has the same behavior as a value of 0.
#### `pattern` {#pattern}

The value of this keyword MUST be a string. This string SHOULD be a valid
regular expression, according to the ECMA-262 regular expression dialect.
regular expression as indicated in
[JSON Schema Core, section 6.3](./jsonschema-core.html#regex).
<!-- This link assume a publish path, which we don't know yet. -->

A string instance is considered valid if the regular expression matches the
instance successfully. Recall: regular expressions are not implicitly anchored.
Expand Down
Loading