"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateRegister = exports.validateLogin = void 0;
const express_validator_1 = require("express-validator");
const validator_handle_1 = require("../utils/handlers/validator.handle");
exports.validateLogin = [
    (0, express_validator_1.check)("email").exists().notEmpty(),
    (0, express_validator_1.check)("password").exists().notEmpty(),
    (req, res, next) => {
        (0, validator_handle_1.validateResult)(req, res, next);
    },
];
exports.validateRegister = [
    (req, res, next) => {
        console.log(req.body);
        next();
    },
    (0, express_validator_1.check)("email").exists().notEmpty().isEmail(),
    (0, express_validator_1.check)("password").exists().notEmpty().isLength({ min: 8, max: 15 }),
    (req, res, next) => {
        (0, validator_handle_1.validateResult)(req, res, next);
    },
];
