{"version":3,"file":"forbidden.mjs","names":[],"sources":["../../../../../../../../@warlock.js/seal/src/rules/core/forbidden.ts"],"sourcesContent":["import { invalidRule, VALID_RULE } from \"../../helpers\";\r\nimport { isEmptyValue } from \"../../helpers/is-empty-value\";\r\nimport type { SchemaRule } from \"../../types\";\r\n\r\n/**\r\n * Forbidden rule - value must not be present\r\n */\r\nexport const forbiddenRule: SchemaRule = {\r\n  name: \"forbidden\",\r\n  defaultErrorMessage: \"The :input is forbidden\",\r\n  async validate(value: any, context) {\r\n    if (!isEmptyValue(value)) {\r\n      return invalidRule(this, context);\r\n    }\r\n    return VALID_RULE;\r\n  },\r\n};\r\n"],"mappings":";;;;;;;;AAOA,MAAa,gBAA4B;CACvC,MAAM;CACN,qBAAqB;CACrB,MAAM,SAAS,OAAY,SAAS;EAClC,IAAI,CAAC,aAAa,KAAK,GACrB,OAAO,YAAY,MAAM,OAAO;EAElC,OAAO;CACT;AACF"}