-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
featureNew functionality or improvementNew functionality or improvement
Milestone
Description
Context
- joi version: 13.1.0
What are you trying to achieve or the steps to reproduce ?
const schema = Joi.object().rename(/^someprefix-(\w+)$/g, '$1', { ignoreUndefined: true, multiple: true });
schema.validate({ 'someprefix-A': 1, 'someprefix-B': 2 }, { convert: true });Which result you had ?
{ '$1': 1, 'someprefix-B': 2 }
renaming by capture group is not work.
What did you expect ?
from supports regexp, so why not add support capturing group to to parameter?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureNew functionality or improvementNew functionality or improvement