Created the key.ts validation

This commit is contained in:
2023-01-22 18:04:12 +01:00
parent 1be7efea8a
commit e75a2cc38c

@ -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)
});