Bug Tracker

Modify

Ticket #4490 (closed enhancement: invalid)

Opened 5 years ago

Last modified 2 years ago

[validate] Please add IP validation to Jquery validate plugin

Reported by: aerobson@… Owned by: joern
Priority: trivial Milestone: 1.4
Component: plugin Version: 1.3.2
Keywords: Cc:
Blocking: Blocked by:

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.

Attachments

jquery.validate.js Download (35.2 KB) - added by aerobson@… 5 years ago.
My updated version of the Jquery validate plugin which includes IP validation

Change History

Changed 5 years ago by aerobson@…

My updated version of the Jquery validate plugin which includes IP validation

comment:1 Changed 5 years ago by dmethvin

  • Owner set to joern

comment:2 Changed 4 years ago by john

  • Status changed from new to closed
  • Resolution set to invalid

Please file plugin bugs with the appropriate author on their bug tracker.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.