Skip to content

joi.uriQueryParam() validator? #474

@raisch

Description

@raisch

Since it's a pretty standard use-case, would it make sense to add a new validation for URI query parameters?

So rather than

var routes = [{
    ...
    validate: {
        query: {
            type: joi.alternatives().try(
                joi.string(),
                joi.array().includes(joi.string())
            ).description('types')
        }
    }
}];

perhaps

var routes=[{
    ...
    validate:{
        query:{
            type:joi.uriQueryParam().description('types')
        }
    }
}];

Metadata

Metadata

Assignees

Labels

featureNew functionality or improvement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions