const { body } = require('express-validator');

const emailValidator = body('email').isEmail().withMessage('Gecerli bir email adresi girin');
const passwordValidator = body('password')
  .isLength({ min: 6 })
  .withMessage('Sifre en az 6 karakter olmali');

const registerValidator = [emailValidator, passwordValidator];
const loginValidator = [emailValidator, passwordValidator];

module.exports = {
  registerValidator,
  loginValidator
};
