"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.isValidPassword = exports.isValidEmail = void 0;
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email#Validation
// eslint-disable-next-line max-len
const emailPattern = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;

const isValidEmail = email => emailPattern.test(email);

exports.isValidEmail = isValidEmail;

const isValidPassword = password => password && password.length >= 8 && password.length <= 24;

exports.isValidPassword = isValidPassword;