-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Check if value is a RegEx #408
Comments
It would be a nice addition. |
We can add a rule for checking |
Sounds good! Maybe |
@donaldpipowitch nah. No need for shortcuts on that one. Be explicit. I'll take a pull request adding this. |
You decide, that's okay for me. I would still recommend it for consistency. Why would there be an API like |
Because dates are very common in data schema while regex is really only applicable for JS objects. Validating that something is a regex is just not that useful use case. |
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions. |
What is the correct way to check if a value is a RegEx? With an API like
Joi.string()
,Joi.object()
,Joi.array()
I thought something likeJoi.regex()
would be available, but this isn't the case. I couldn't find something in the docs about this.The text was updated successfully, but these errors were encountered: