Currently I have a script that checks if the form field has any tags like so: \[code\]$('#mytext').live ('mouseleave change', function () { var textVal= $(this).val(); var result=(/<iframe.*/ig).test(textVal); console.log('input is:'+!result); });?\[/code\]This returns the correct result, however i'd like to push further validate a form field from having any \[code\]<iframe>\[/code\] tags entered.I have tried this with no such luck:\[code\]$.validator.addMethod("formRegex", function(value, element) { return this.optional(element) || /(<iframe.+?<\/iframe>)/g.test(value); }, "No iFrames"); $("#submitForm").validate({ rules: { "dmytext": { formRegex: true, } }, messages: { "mytext": { formRegex: "No iFrame tags allowed" } } });\[/code\]Am I missing something? Is this regex incorrect? Or should I not be using regex at all for this?