pattern is implied global on line 699 of validator.js #88

MikeDocker opened this Issue Jun 16, 2012 · 1 comment


None yet
2 participants

Hi Chris,

I've been using validator.js for a few months and finding it very useful. Thanks very much for making it available.

However, in running unit tests on my code with Mocha.js I think I have identified an implied global variable (pattern) in the function that begins on line 697 (Validator.prototype.isUUID).

With the source code for validator.js as is, Mocha warns me of a global variable leak which I can make go away by prefixing the first use of pattern with var.

Hope this is useful to know.



This comment has been minimized.

Show comment Hide comment

chriso Jun 19, 2012


Thanks, fixed


chriso commented Jun 19, 2012

Thanks, fixed

chriso added a commit that referenced this issue Jun 19, 2012

@chriso chriso closed this Jul 22, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment