Created the validation object for the link shortener
This commit is contained in:
12
api/validations/linkValidation.ts
Normal file
12
api/validations/linkValidation.ts
Normal 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)
|
||||
});
|
Reference in New Issue
Block a user