Regex bug in pattern validator - by dtyler7

Status : 

  Not Reproducible<br /><br />
		The product team could not reproduce this item with the description and steps provided.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


ID 836117 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 3/18/2014 6:46:32 AM
Access Restriction Public

Description

There is a bug with the pattern validator (tested IE 11.0.9600.16521)

The pattern attribute, per W3, should match the entire user input against the pattern, as if it had starting and ending anchors. There appears to be a bug where the regex engine does not check the entire string, leading to subtle problems with alterations, which may or may not match the entire string. Instead, it seems a second check is performed after the regex validator to check the length of the string is equal to the pattern match.

See stack overflow post http://stackoverflow.com/questions/22360235/do-browsers-support-different-html5-pattern-regexp-features

Per the W3 spec the pattern field should match 
Sign in to post a comment.
Posted by BKDotCom on 8/12/2014 at 10:33 AM
easily reproduceable

<input pattern="(\d{2}|\d{4})" required />

IE10
should validate but does not: "12"
should validate but does not: "1234"
should NOT validate but does: "123456"
Posted by Microsoft on 4/8/2014 at 10:01 AM
Hello,
                At this time we will go ahead and close out this feedback as no repro. If you are still able to reproduce the issue can you please reopen this bug and provide the following:
1)    IE version and build number listed in the Help|About dialogue

Best regards,
The Internet Explorer Team
Posted by Microsoft on 3/26/2014 at 6:33 AM
Hello,
                Thank you for the feedback. We have been testing this scenario with Windows 8.1 IE 11 GA and Windows 7 IE 11 GA builds and did not reproduce the issue. Perhaps we are missing something in our repro steps \ approach.

                Would it be possible for you to please collect the following information to help us in our investigation of this issue?

1)    IE version and build number listed in the Help|About dialogue
2)    Problem state recorder of the issue this will help us visualize the issue you are experiencing. Problem state recorder is a tool included with both Windows 7 and Windows 8
a.    Please open PSR.exe from C:\Windows\System32\psr.exe
b.    Please reproduce the issue you are experiencing
c.    Stop the PSR.exe and save the file
d.    Attach the PSR.exe output to connect.
The PSR.exe tool will take screen shots and mouse clicks so we can attempt to reproduce the issue here. NOTE: Please do not visit any sites that contain personal or sensitive data such as passwords or financial data while collecting the PSR.exe data.
Best regards,
The Internet Explorer Team
Posted by Microsoft on 3/20/2014 at 7:14 AM
Thank you for your feedback!

We will be investigating this issue further.

Best Regards,
The Internet Explorer Team