I am wanting to check if an input field has the attribute \"pattern\" and if so, preform a regex check aganst said pattern.I know this is already done by HTML5, but I am wan
A string is not a RegExp object. You could use something like:
RegExp
var reg = new RegExp($(this).attr("pattern"));