You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If testing potentially random strings, I would not want to this to be valid.
However, if testing an string that is expected to be an ip address, I might want to allow it as valid.
Would it be possible to make a more strict ip address validator to does not allow leading zeros?
Activity
ShivaShankerReddy commentedon Dec 2, 2019
Hi @thestick613 ,
Anything between 0-255.0-255.0-255.0-255 is considered as ipv4 address?
Can you specify why it is not validated as ipv4.
Regards,
Shiva
brl0 commentedon Dec 2, 2019
I too would have thought this should not be a valid address.
Leading zeros are typically not used, but it seems that is by convention.
Here are a couple of links discussing this:
https://superuser.com/questions/857603/are-ip-addresses-with-and-without-leading-zeroes-the-same
https://superuser.com/questions/929153/leading-zeros-in-ipv4-address-is-that-a-no-no-by-convention-or-standard
If testing potentially random strings, I would not want to this to be valid.
However, if testing an string that is expected to be an ip address, I might want to allow it as valid.
Would it be possible to make a more strict ip address validator to does not allow leading zeros?
nandgator commentedon Mar 10, 2023
ref #239