RegularExpressionAttribute bug - by Ludovic Dubois

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


1
0
Sign in
to vote
ID 773530 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 12/5/2012 4:42:39 AM
Access Restriction Public

Description

Regular expression such as "^\S+$" does not work because "" succeed!

RegularExpressionAttribute.IsValid has a test string.IsNullOrEmpty(input)) return true; that is wrong. null is a special case, but empty should be used as a testable value.
Sign in to post a comment.
Posted by Microsoft on 2/18/2013 at 10:33 AM
The Silverlight docs state this behavior (http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.regularexpressionattribute(v=VS.95).aspx) but the .NET full docs do not (http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.regularexpressionattribute(v=vs.110).aspx). We plan to update the documentation to match.
Posted by Microsoft on 12/6/2012 at 12:18 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Posted by Microsoft on 12/5/2012 at 4:50 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)