Skip to content

Fix URL sup example #4959

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

Merged
merged 1 commit into from
Jul 23, 2025
Merged

Fix URL sup example #4959

merged 1 commit into from
Jul 23, 2025

Conversation

unrevised6419
Copy link
Contributor

Internally this uses the new URL() constructor to validate inputs

Bellow code will fail

const schema = z.url();
schema.parse("sup");

colinhacks added a commit that referenced this pull request Jul 23, 2025
@colinhacks colinhacks merged commit 7f3cf94 into colinhacks:main Jul 23, 2025
4 checks passed
colinhacks added a commit that referenced this pull request Jul 23, 2025
colinhacks added a commit that referenced this pull request Jul 23, 2025
@colinhacks colinhacks mentioned this pull request Jul 23, 2025
colinhacks added a commit that referenced this pull request Jul 23, 2025
* Fix File reference issues. Fixes #4880. Fixes #4933.

* Relax metadata constraint to object. Fixes #4929

* Clean up partialRecord implementation. Closes #4882.

* Fixes catch handling in object schemas. Fixes #4883.

* Add treeshake case

* Document optionality changes

* Fix docs build

* Do not return empty metadata objects. Fixed #4885

* Escape non-string literal patterns. Closes #4894

* Surface continuable errors preferentially in unions. Fixes #4896

* Drop private modifier. Fixes #4903

* Simplify object parsing. Closes #4900

* Clean up .caught

* Make message a non-getter. Closes #4901.

* Standardize behavior of transform and preprocess. Closes #4910

* Clean up docs

* Fix extend for recursive objects. Fixes #4931

* Make object methods work with recursive types. Closes #4931 again

* Improve laziness of object methods

* Make standardschema FailureResult work with prettifyError. Closes #4914.

* Do not use normalized URLs by default. Add normalize flag to ZodURL. Closes #4906

* Tweak URL docs. Closes #4959

* 4.0.6
@unrevised6419 unrevised6419 deleted the patch-1 branch July 24, 2025 06:54
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