Skip to content

failure to validate regex schema format containing '/' character #508

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

Closed
orrisroot opened this issue Apr 27, 2018 · 3 comments
Closed

failure to validate regex schema format containing '/' character #508

orrisroot opened this issue Apr 27, 2018 · 3 comments
Labels

Comments

@orrisroot
Copy link

In FormatConstraint::validateRegex() method, '/' character has used for delimiter of preg_match() function.
If regex format contains '/' character, then schema validator always fails.
It seems to escape '/' character before preg_match() function call.

@erayd
Copy link
Contributor

erayd commented Apr 30, 2018

Confirmed - FormatConstraint::validateRegex() does not translate from ECMA-262 to PCRE, and does not escape PCRE delimiters. Thanks for reporting this.

I'm somewhat short on time at the moment - I've added this to my (long!) todo list, but you're welcome / encouraged to submit a PR for it if you want this fixed quickly :-).

@guilliamxavier
Copy link
Contributor

See #649

@DannyvdSluijs
Copy link
Collaborator

This was already fixed in #650.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants