"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FromNameValidationSchema = void 0;
const lodash_1 = require("lodash");
const zod_1 = require("zod");
exports.FromNameValidationSchema = zod_1.z
    .union([
    // 11 alphanumerical characters
    zod_1.z.string().max(11),
    // 16 digits
    zod_1.z.string().max(16).regex(/^\d+$/, {
        message: '"From/sender name" can contain either up to 11 alphanumerical characters or up to 16 digits',
    }),
])
    // if value is empty - treat it as undefined
    .transform((value) => ((0, lodash_1.isEmpty)(value) ? undefined : value))
    .optional();
//# sourceMappingURL=validation.js.map