I am using "http://jqueryvalidation.org/" Jquery validator for validating my form.
In my form's URL field, a user can enter three types of URLs:-
1> http://192.16.19.65
- IP ADDRESS
2> http://application.com
- ANY WEB URL
3> https://application.com
- ANY SECURE WEB URL
Everything is working fine, but, Its working fine for Web URLs, but its not accepting the IP address.
Here is my code below:-
JQUERY
<script>
$().ready(function () {
// validate signup form on keyup and submit
$("#applicationUrlSetup").validate({
rules: {
ApplicationUrl: {
required: true,
url: true
}
},
messages: {
ApplicationUrl: {
required: "Please enter your Application URL!",
url: "Please enter a valid Application URL in, 'http://192.16.19.65', 'http://application.com' or 'https://application.com' format!",
}
}
});
});
HTML
<p>
<input id="ApplicationUrl" name="ApplicationUrl" type="text" />
</p>
Can you please suggest what can be done to make accept IP address too?
Let me know if you need any other info.
Thank You