Skip to content

Commit fcb722a

Browse files
committed
Add uuid to changelog
1 parent 12dd489 commit fcb722a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/docs/content/v4/changelog.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,14 @@ z.string().email(); // ❌ deprecated
320320
z.email(); //
321321
```
322322

323+
### stricter `.uuid()`
324+
325+
The `z.uuid()` now validates UUIDs more strictly against the RFC 4122 specification; specifically, the variant bits must be `10` per the spec. For a more permissive "UUID-like" validator, use `z.guid()`.
326+
327+
```ts
328+
z.uuid(); // RFC 4122 compliant UUID
329+
z.guid(); // any 8-4-4-4-12 hex pattern
330+
```
323331

324332
### no padding in `.base64url()`
325333

0 commit comments

Comments
 (0)