Form text field masking and required fields sometimes not working