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

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

Open
orrisroot opened this issue Apr 27, 2018 · 2 comments
Open

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

orrisroot opened this issue Apr 27, 2018 · 2 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
Collaborator

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

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

4 participants