import {body,oneOf} from "express-validator"; export const swiftMsgrUserProfileReqValidators = { create:() => [oneOf([ body("lang").exists(), body("settings").exists(), body("bio").exists(), body("motto").exists(), body("img").exists(), body("expYrs").exists(), body("expLvl").exists(), body("socials").exists(),])], update:() => [oneOf([ body("username").exists(), body("lang").exists(), body("settings").exists(), body("bio").exists(), body("motto").exists(), body("img").exists(), body("expYrs").exists(), body("expLvl").exists(), body("socials").exists(), body("addFollowers").exists(), body("removeFollowers").exists(), body("addFollowing").exists(), body("removeFollowing").exists(),])], updateMany:() => [ body("ids").exists(), body("updates").exists(), oneOf([ body("updates.username").exists(), body("updates.lang").exists(), body("updates.settings").exists(), body("updates.bio").exists(), body("updates.motto").exists(), body("updates.img").exists(), body("updates.expYrs").exists(), body("updates.expLvl").exists(), body("updates.socials").exists(), body("updates.addFollowers").exists(), body("updates.removeFollowers").exists(), body("updates.addFollowing").exists(), body("updates.removeFollowing").exists(),])], removeMany:() => [body("ids").exists()], }; const userValidationRules = () => [ body("username").isEmail(),// username must be an email body("password").isLength({ min: 5 }),// password must be at least 5 chars long ];