if ( ! input.hasOwnProperty('pattern') && ~input.value.search(input.pattern)) { // Valid input field for browsers which don't support `pattern` attribute. }
jsFiddle.