Skip to content
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

Support IP Range Validation #2758

Open
hayata-yamamoto opened this issue Sep 22, 2023 · 4 comments
Open

Support IP Range Validation #2758

hayata-yamamoto opened this issue Sep 22, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@hayata-yamamoto
Copy link

hayata-yamamoto commented Sep 22, 2023

This PR supports ip address, but sometimes we need to support network range.
#2066

So, we need like below validators for string.

z.string().ip_range({ version: "v4"})

or

z.string().ipv4Range();
z.string().ipv6Range();
@JacobWeisenburger JacobWeisenburger added the enhancement New feature or request label Sep 22, 2023
@NotEvenANeko
Copy link

I'd like to try this.

Does the ip range mean the CIDR notation like 192.168.0.0/16?

@hayata-yamamoto
Copy link
Author

@NotEvenANeko
Exactly, that's what I want to share here!

@kenechukwuJosiah
Copy link

@hayata-yamamoto This is awesome

@hayata-yamamoto
Copy link
Author

Is anybody handling this issue?

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

No branches or pull requests

4 participants