-
Notifications
You must be signed in to change notification settings - Fork 215
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
Pattern/RegExp class schema doesn't actually check if value is RegExp instance #569
Comments
Pattern/RegExp class schema was added here: https://github.com/metosin/malli/pull/68/files But I don't have idea what it was supposed to do. |
Ok, it is for cases like |
In longer term, might be good just to support |
Perhaps. The use case here was to have a RegExp instance as a value.
There doesn't seem to be any way to validate the value is a regexp instance right now. (Without going through |
I would like to be able to check that a value is a regular expression instance of the platform-specific type ( |
I'm quite sure the implementation should check if the value is Regexp instance here.
We don't seem to have any test cases for this.
We could also consider if there should be an easy cross-platform way to create this schema?
https://github.com/metosin/malli/blob/master/src/malli/core.cljc#L2251-L2252
https://github.com/metosin/malli/blob/master/src/malli/core.cljc#L1304
The text was updated successfully, but these errors were encountered: