zod 4.0.0-beta.20250411T232125 → 4.0.0-beta.20250412T084412

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -232,7 +232,7 @@ exports.ZodString = core.$constructor("ZodString", (inst, def) => {
232
232
  inst.time = (params) => inst.check(iso.time(params));
233
233
  inst.duration = (params) => inst.check(iso.duration(params));
234
234
  // validations
235
- inst.regex = (params) => inst.check(checks.regex(params));
235
+ inst.regex = (...args) => inst.check(checks.regex(...args));
236
236
  inst.includes = (...args) => inst.check(checks.includes(...args));
237
237
  inst.startsWith = (params) => inst.check(checks.startsWith(params));
238
238
  inst.endsWith = (params) => inst.check(checks.endsWith(params));
@@ -118,7 +118,7 @@ export const ZodString = /*@__PURE__*/ core.$constructor("ZodString", (inst, def
118
118
  inst.time = (params) => inst.check(iso.time(params));
119
119
  inst.duration = (params) => inst.check(iso.duration(params));
120
120
  // validations
121
- inst.regex = (params) => inst.check(checks.regex(params));
121
+ inst.regex = (...args) => inst.check(checks.regex(...args));
122
122
  inst.includes = (...args) => inst.check(checks.includes(...args));
123
123
  inst.startsWith = (params) => inst.check(checks.startsWith(params));
124
124
  inst.endsWith = (params) => inst.check(checks.endsWith(params));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zod",
3
- "version": "4.0.0-beta.20250411T232125",
3
+ "version": "4.0.0-beta.20250412T084412",
4
4
  "type": "module",
5
5
  "author": "Colin McDonnell <zod@colinhacks.com>",
6
6
  "description": "TypeScript-first schema declaration and validation library with static type inference",
@@ -70,7 +70,7 @@
70
70
  }
71
71
  },
72
72
  "dependencies": {
73
- "@zod/core": "0.4.1"
73
+ "@zod/core": "0.4.3"
74
74
  },
75
75
  "scripts": {
76
76
  "clean": "rm -rf dist",
package/src/schemas.ts CHANGED
@@ -323,7 +323,7 @@ export const ZodString: core.$constructor<ZodString> = /*@__PURE__*/ core.$const
323
323
  inst.duration = (params) => inst.check(iso.duration(params as any));
324
324
 
325
325
  // validations
326
- inst.regex = (params) => inst.check(checks.regex(params));
326
+ inst.regex = (...args) => inst.check(checks.regex(...args));
327
327
  inst.includes = (...args) => inst.check(checks.includes(...args));
328
328
  inst.startsWith = (params) => inst.check(checks.startsWith(params));
329
329
  inst.endsWith = (params) => inst.check(checks.endsWith(params));