mirror of
https://github.com/gnmyt/LicenseAPI.git
synced 2026-01-11 02:31:46 +00:00
Create auth.ts validation
This commit is contained in:
15
src/routes/v1/validations/auth.ts
Normal file
15
src/routes/v1/validations/auth.ts
Normal file
@ -0,0 +1,15 @@
|
||||
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().length(96).required()
|
||||
});
|
||||
|
||||
export const verificationValidation = Joi.object({
|
||||
token: Joi.string().hex().length(96).required(),
|
||||
code: Joi.number().integer().required()
|
||||
});
|
||||
Reference in New Issue
Block a user