Side navigation
#4490 closed enhancement (invalid)
Opened April 03, 2009 09:19PM UTC
Closed February 05, 2010 08:37PM UTC
Last modified March 13, 2012 04:50PM UTC
[validate] Please add IP validation to Jquery validate plugin
Reported by: | aerobson@pobox.com | Owned by: | joern |
---|---|---|---|
Priority: | trivial | Milestone: | 1.4 |
Component: | plugin | Version: | 1.3.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I would like to add IP validation to the Jquery validate plugin. Here is the heart of the code that I use:
ipaddress: function(value, element) {
// author: Ann Robson
return this.optional(element) || /^([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))$/i.test(value);
},
I will attach my updated version which uses the most recent jquery.validate.js file as a base.
BEFORE YOU DELETE: the instruction on the Jquery validate home page say to do exactly this, and there is no validate plugin bug submit option, so I'm not sure how else I can submit this enhancement.