-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
featureNew functionality or improvementNew functionality or improvement
Milestone
Description
Describe the problem you are trying to fix (provide as much context as possible)
const baseStringSchema = Joi.string().trim();
const keepWhitespaceSchema = baseStringSchema.trim(false);This is needed because I want to trim every string by default, but allow sometimes.
Which API (or modification of the current API) do you suggest to solve that problem ?
string.trim()- Just adding
enabled?: booleanoption to the existingtrim()implementation will solve above problem, like the existingstring.truncate([enabled])method.
Are you ready to work on a pull request if your suggestion is accepted ?
👌
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
featureNew functionality or improvementNew functionality or improvement