{"version":3,"file":"index-DRkIogCt.js","sources":["../../Client/webkit/validation/rules/regex/index.ts"],"sourcesContent":["import { Rule } from '@webkit/validation/value';\r\n\r\nexport const regex = (pattern: RegExp, error?: string) =>\r\n    ({\r\n        id: 'regex',\r\n        validator: value => !value || pattern.test(value),\r\n        error: (name: string) => error || `Please enter a valid ${name}.`,\r\n    } as Rule<string>);\r\n"],"names":["regex","pattern","error","value","name"],"mappings":"AAEa,MAAAA,EAAQ,CAACC,EAAiBC,KAClC,CACG,GAAI,QACJ,UAAoBC,GAAA,CAACA,GAASF,EAAQ,KAAKE,CAAK,EAChD,MAAQC,GAAiBF,GAAS,wBAAwBE,CAAI,GAClE"}