Re:Show HN: a small jQuery Form Validation library
by mediumdeviation on Sunday November 04, 2012 @09:36AM
(#4739854)
In your example,
can be replaced with
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...
[ Parent
| on HN ]
There are no comments on this comment yet.