{"version":3,"file":"email.mjs","names":[],"sources":["../../../../../../../../@warlock.js/seal/src/rules/string/email.ts"],"sourcesContent":["import { isEmail } from \"@mongez/supportive-is\";\r\nimport { invalidRule, VALID_RULE } from \"../../helpers\";\r\nimport type { SchemaRule } from \"../../types\";\r\n\r\n/**\r\n * Email rule - validates email format\r\n */\r\nexport const emailRule: SchemaRule = {\r\n  name: \"email\",\r\n  defaultErrorMessage: \"The :input must be a valid email address\",\r\n  async validate(value: any, context) {\r\n    if (isEmail(value)) {\r\n      return VALID_RULE;\r\n    }\r\n    return invalidRule(this, context);\r\n  },\r\n};\r\n"],"mappings":";;;;;;;;AAOA,MAAa,YAAwB;CACnC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,QAAQ,KAAK,GACf,OAAO;EAET,OAAO,YAAY,MAAM,OAAO;CAClC;AACF"}