I need to add IP Validation in my project .Is there any function in jquery or in jquery mobile.So that it will validate the in put field?
Thanks
Hi this is the best Solution and Mask for IP Adress
$.validator.addMethod('IP4Checker', function(value) {
var ip = /^(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))$/;
return value.match(ip);
}, 'Invalid IP address');
var $validator = $("#addCardForm").validate({
rules: {
txtIP: {
required: true,
IP4Checker: true
}
}
});