fixed problem with html5 'pattern' attribute