Plugins

The plugins site is currently in development.

We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.

Missing semi-colon in additional methods throws off minifiers


Project:Validation
Version:1.5.5
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I'm working on a project that combines and minifies javascript files as part of its functionality.

On line 110 of the additional-methods.js class there is one line that results in various errors.

var re = /^\d{1,2}\/\d{1,2}\/\d{4}$/
if( re.test(value)){

Then that code gets minified (I'm using the JsMin php port) the if statement gets appended to the regular expression, resulting in an error.

var re = /^\d{1,2}\/\d{1,2}\/\d{4}$/if( re.test(value)){

I added a semicolon on my local copy and it took care of things nicely.

This problem is probably more of a concern with the minifier than anything else, but since its such a small fix (much easier than trying to get the minifier to work) I was hoping it would get picked up.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

#1

Status:active» fixed

#2

Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

#3

Automatically closed -- issue fixed for two weeks with no activity.

#4

I'm now converting whatever is passed to $.trim to a string. Fixes this issue. Online Clinical Psychology Degree AND Bachelors degrees AND Online Certificate Program AND Advertising degree AND private security degree

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.