HEX
Server: LiteSpeed
System: Linux spg20.cloudpowerdns.com 5.14.0-611.35.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 25 03:46:09 EST 2026 x86_64
User: carrerup (3153)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: //opt/bitninja-dispatcher/node_modules/class-validator/esm5/decorator/string/IsEmail.js.map
{"version":3,"file":"IsEmail.js","sourceRoot":"","sources":["../../../../src/decorator/string/IsEmail.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AAGrD,MAAM,CAAC,IAAM,QAAQ,GAAG,SAAS,CAAC;AAElC;;;GAGG;AACH,MAAM,UAAU,OAAO,CAAC,KAAc,EAAE,OAAoC;IAC1E,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AACvE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,OAAO,CACrB,OAAoC,EACpC,iBAAqC;IAErC,OAAO,UAAU,CACf;QACE,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE;YACT,QAAQ,EAAE,UAAC,KAAK,EAAE,IAAI,IAAc,OAAA,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAnC,CAAmC;YACvE,cAAc,EAAE,YAAY,CAAC,UAAA,UAAU,IAAI,OAAA,UAAU,GAAG,4BAA4B,EAAzC,CAAyC,EAAE,iBAAiB,CAAC;SACzG;KACF,EACD,iBAAiB,CAClB,CAAC;AACJ,CAAC","sourcesContent":["import { ValidationOptions } from '../ValidationOptions';\nimport { buildMessage, ValidateBy } from '../common/ValidateBy';\nimport isEmailValidator from 'validator/lib/isEmail';\nimport ValidatorJS from 'validator';\n\nexport const IS_EMAIL = 'isEmail';\n\n/**\n * Checks if the string is an email.\n * If given value is not a string, then it returns false.\n */\nexport function isEmail(value: unknown, options?: ValidatorJS.IsEmailOptions): boolean {\n  return typeof value === 'string' && isEmailValidator(value, options);\n}\n\n/**\n * Checks if the string is an email.\n * If given value is not a string, then it returns false.\n */\nexport function IsEmail(\n  options?: ValidatorJS.IsEmailOptions,\n  validationOptions?: ValidationOptions\n): PropertyDecorator {\n  return ValidateBy(\n    {\n      name: IS_EMAIL,\n      constraints: [options],\n      validator: {\n        validate: (value, args): boolean => isEmail(value, args.constraints[0]),\n        defaultMessage: buildMessage(eachPrefix => eachPrefix + '$property must be an email', validationOptions),\n      },\n    },\n    validationOptions\n  );\n}\n"]}