Created the key.ts validation
This commit is contained in:
parent
1be7efea8a
commit
e75a2cc38c
7
src/routes/v1/validations/key.ts
Normal file
7
src/routes/v1/validations/key.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import Joi from "joi";
|
||||
import { IKeyRole } from "@models/AccessKey";
|
||||
|
||||
export const keyCreationValidation = Joi.object({
|
||||
name: Joi.string().min(2).max(15).required(),
|
||||
role: Joi.number().valid(IKeyRole)
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user