{"version":3,"file":"matches.cjs","names":[],"sources":["../../../src/validators/matches/matches.ts"],"sourcesContent":["import type { SyncReactNode } from '../types';\n\nexport function matches(regexp: RegExp, error?: SyncReactNode) {\n  const _error = error || true;\n\n  return (value: unknown): SyncReactNode => {\n    if (typeof value !== 'string') {\n      return _error;\n    }\n\n    return regexp.test(value) ? null : _error;\n  };\n}\n"],"mappings":";;AAEA,SAAgB,QAAQ,QAAgB,OAAuB;CAC7D,MAAM,SAAS,SAAS;CAExB,QAAQ,UAAkC;EACxC,IAAI,OAAO,UAAU,UACnB,OAAO;EAGT,OAAO,OAAO,KAAK,KAAK,IAAI,OAAO;CACrC;AACF"}