Created the auth validation
This commit is contained in:
parent
06a917a5fd
commit
4bf0576032
10
src/routes/v1/validations/auth.ts
Normal file
10
src/routes/v1/validations/auth.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import Joi from "joi";
|
||||
|
||||
export const loginValidation = Joi.object({
|
||||
username: Joi.string().min(3).max(15).alphanum().required(),
|
||||
password: Joi.string().min(5).max(50).required()
|
||||
});
|
||||
|
||||
export const tokenValidation = Joi.object({
|
||||
token: Joi.string().hex().min(96).max(96).required()
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user