News for hackers. Stuff that matters.
Re:Show HN: a small jQuery Form Validation library by mediumdeviation on Sunday November 04, 2012 @09:36AM (#4739854)
In your example,

  $("ul").html("");
can be replaced with

  $("ul").empty();
The replacePlaceholdersInMessage function uses replace with string as the match, which means that in rare cases where more than one %F is present, for instance, only the first will be replaced. To fix this you have to pass in a new RegExp object with the 'g' (global) flag instead. See https://developer.mozilla.org/en-US/docs/JavaScript/Referenc...

There are no comments on this comment yet.