We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, dear validation addicts
I recently had an issue when trying to validate a string against a pattern case insensitive. Indeed, the regexp is currently built as following:
# https://github.com/Constellation/ruby-jsonchema/blob/master/lib/jsonschema.rb#L120 Regexp.new(schema['pattern'])
As a result, pattern options are lost when extracting the source only:
r = /cat/ix schema['pattern'] = r.source Regexp.new(schema['pattern']) # => /cat/
Would be great to have the possibility to pass pattern options too:
r = /cat/ix schema['pattern'] = r.source schema['pattern'] = r.options Regexp.new(schema['pattern'],schema['pattern_options']) # => /cat/ix
Best regards, Guillaume
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, dear validation addicts
I recently had an issue when trying to validate a string against a pattern case insensitive.
Indeed, the regexp is currently built as following:
As a result, pattern options are lost when extracting the source only:
Would be great to have the possibility to pass pattern options too:
Best regards,
Guillaume
The text was updated successfully, but these errors were encountered: