Skip to content

String format validation for IP addresses with network mask #1501

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

Closed
shodhansave opened this issue Apr 3, 2024 · 1 comment
Closed

String format validation for IP addresses with network mask #1501

shodhansave opened this issue Apr 3, 2024 · 1 comment

Comments

@shodhansave
Copy link

Hello folks,

I came across string validation format for IP addresses. I was wondering if we can support the addresses with network mask as well. That means validating something like 192.168.10.0/31.

This can be achieved using regexp, but I'm curious to know if this validation can be part of the spec.

Thanks

@gregsdennis
Copy link
Member

@shodhansave the format keyword is open-ended and not validated by default, so you're welcome to make any format you want.

I'm not sure that this specific format warrants inclusion in the spec, though. Happy to be proven wrong if you can prove the demand for it.

Closing this for now.

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

No branches or pull requests

2 participants