wonderfan / javascript

Explore the power of HTML,CSS and JavaScript
1 stars 0 forks source link

IP and subnet validation #11

Closed wonderfan closed 9 years ago

wonderfan commented 9 years ago

One regular expression to valid IP

"regex":"/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/"
wonderfan commented 9 years ago

a simple and user validation library : https://github.com/rickharrison/validate.js/blob/master/validate.js

wonderfan commented 9 years ago

This one is used in my code :+1: https://github.com/markwillis82/ipFunctions/blob/master/lib/cidr.js

wonderfan commented 9 years ago

javascript ip library: https://github.com/andreax79/iplib.js

wonderfan commented 9 years ago

Use is_ip method to test the validness: https://github.com/DavidTPate/isip/blob/master/index.js