"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.assertInput = assertInput;
exports.isValidEmail = isValidEmail;
const http_1 = require("../../http");
function assertInput(value, field) {
    if (value === undefined || value === null || value === '') {
        throw new http_1.HttpBadRequestError(field ? `${field} is required` : 'missing parameters');
    }
}
function isValidEmail(value) {
    return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value);
}
//# sourceMappingURL=validation.js.map