Created the validation object for the link shortener

This commit is contained in:
2022-09-09 01:07:09 +02:00
parent 1514edad54
commit 558e84ff7f

View File

@ -0,0 +1,12 @@
import Joi from 'joi';
export const shortUrl = Joi.object({
originalUrl: Joi.string()
.uri()
.min(5)
.max(1000)
.required(),
shortenedId: Joi.string()
.min(5)
.max(15)
});