Skip to content

Restore "regex" to the list of formats. #398

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

Merged
merged 3 commits into from
Sep 23, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
9 changes: 9 additions & 0 deletions jsonschema-validation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,15 @@
<xref target="RFC6901">RFC 6901, section 5</xref>
</t>
</section>
<section title="regex">
<t>
This attribute applies to string instances.
</t>
<t>
A regular expression, which SHOULD be valid according to the
<xref target="ecma262">ECMA 262</xref> regular expression dialect.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't recall off hand, but I suspect strongly that the original spec made the same mention here that implementations may not be using ECMA regexes (and that this format might actually mean "some regex dialect, so restrict yourself to the common subsets).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Julian, I'd forgotten about that section. I've updated it and made the regex definition reference it.

</t>
</section>
</section>
</section>

Expand Down
1 change: 1 addition & 0 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
"patternProperties": {
"type": "object",
"additionalProperties": { "$ref": "#" },
"propertyNames": { "format": "regex" },
"default": {}
},
"dependencies": {
Expand Down