-
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
[request] string().replace(pattern) #586
Comments
I wonder if this would be approached better by adding functionality with something like: Joi.string().transform(function(value) {
return value.replace(/\*/g, '%');
}); I could see |
I agree, making it more general makes it more usable. |
Yeah, I could definitely see that. |
Yeah internally it can call a general transform function |
I have a patch for |
+1 |
1 similar comment
👍 |
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. |
This works like you would expect.
Would replace all
*
with%
.This use case is for converting default wildcards to wildcards from sql but can be used for many things.
The text was updated successfully, but these errors were encountered: