We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I see only the option to validate ip without cidr
The text was updated successfully, but these errors were encountered:
There is no function for that, you can use this
function isValidCIDR(cidr: string) { try { const [range, bit] = cidr.split('/'); const subnet = parseInt(bit); if(ip.isV4Format(range)){ return subnet >= 0 && subnet <= 32; }else if(ip.isV6Format(range)){ return subnet >= 0 && subnet <= 128; } return false; } catch { return false; } }
Sorry, something went wrong.
No branches or pull requests
I see only the option to validate ip without cidr
The text was updated successfully, but these errors were encountered: