-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
supportQuestions, discussions, and general supportQuestions, discussions, and general support
Description
Hi, first I must apologise if this isn't 'issue worthy'.
In Joi v1, it is possible to register a 'Type' with the Types Registry. The example in the npm codebase demonstrates this as:
var IntDef = _.extends({}, Number, function () {
// Constructor
return this.integer();
});
Types.set("Int", IntDef);
var Int = Types.Int;I would like to register an AbsoluteURL type, or more simply, validate a URL through Joi.
The ways I can see this happening are:
- function passed as a parameter which validates a given value
- extending an existing type: any, string, email, etc.
- registering a new type
In my research, I have not yet found a solution to this.
Thanks,
Rob.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
supportQuestions, discussions, and general supportQuestions, discussions, and general support