How to Validate IPv4 and IPv6 Prefix ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2020 06:10 PM
Hi,
How to Validate string IPv4 and IPv6 Prefix value On OnChange Client script.
An IPv4 address prefix. The prefix length is given by the number following the slash character and must be less than or equal to 32
ex:209.159.168.0/24, 209.159.168.7/32
An IPv6 address prefix. The prefix length is given by the number following the slash character and must be less than or equal to 128
ex:c0de::0/64, c0de::1/128
I tried with regex expression and SncIPNetworkV4.validate(), but no luck.
Thanks,
Bhargava

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2020 11:41 AM
Hi Chekti,
Few days ago there was something similar to this case from other community user that was answered.
Kindly give link a check for reference.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2020 01:47 PM
The linked thread won't solve this issue because the offered solution doesn't take into account the prefix (e.g. "/24"). Question in this thread explicitly is about regular expression on validating v4 and v6 ip addresses with prefix.