Skip to content

feat(v4): add hash format validation (MD5, SHA-1, SHA-256, SHA-384, SHA-512) #4963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

976520
Copy link

@976520 976520 commented Jul 24, 2025

Summary

  • Hash format validation, Base64 variants
  • Core API functions: _md5(), _sha1(), _sha256(), _sha384(), _sha512()
  • Mini API support
  • Eng locale messages

Usage

import * as z from "zod/v4";

const md5Schema = z.md5();
md5Schema.parse("5d41402abc4b2a76b9719d911017c592");

const sha256Base64Schema = z.sha256Base64();
sha256Base64Schema.parse("XohImNooBHFR0OVvjcYpJ3NgPQ1qq73WKhHvch0VQtg="); 

Issue

#4956

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants