fix pattern validation in firefox