api/src/utils/validator.ts
Function validateYoung
has 270 lines of code (exceeds 200 allowed). Consider refactoring. Open
Open
export function validateYoung(young: YoungDto, user?: UserDto) {
const keys = {
firstName: Joi.string().allow(null, ""),
lastName: Joi.string().allow(null, ""),
frenchNationality: Joi.string().allow(null, ""),
File validator.ts
has 764 lines of code (exceeds 700 allowed). Consider refactoring. Open
Open
import Joi from "joi";
import { ROLES_LIST, SUB_ROLES_LIST, VISITOR_SUB_ROLES_LIST, PHONE_ZONES_NAMES_ARR, UserDto, YoungDto } from "snu-lib";
import { isYoung } from "../utils";
// Source: https://github.com/mkg20001/joi-objectid/blob/71b2a8c0ccd31153e4efd3e7c10602b4385242f6/index.js#L12