Skip to content

Instantly share code, notes, and snippets.

View ReddyDivya's full-sized avatar
🎯
Focusing

Reddy Divya ReddyDivya

🎯
Focusing
View GitHub Profile
@XenRevo
XenRevo / validation.js
Created January 14, 2016 03:09 — forked from bcoughlan/validation.js
jQuery validation - IP address
//Validation
jQuery.validator.addMethod('validIP', function(value) {
var split = value.split('.');
if (split.length != 4)
return false;
for (var i=0; i<split.length; i++) {
var s = split[i];
if (s.length==0 || isNaN(s) || s<0 || s>255)
return false;