Created the auth validation

This commit is contained in:
2023-01-15 19:40:49 +01:00
parent 06a917a5fd
commit 4bf0576032

View 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()
});