Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 18, 2013 01:06 PM by DarrellNorton
Member
17 Points
44 Posts
Feb 18, 2013 04:55 AM|LINK
Hi all,
By default the Compare annotation is case sensitive. wanna make case insensitive.
Or any mechanism through which the textbox value is manipulated for upper / lower case and then the Annotation works on it.
Thanks in advance.
All-Star
86703 Points
9638 Posts
Moderator
MVP
Feb 18, 2013 01:06 PM|LINK
You could write your own case-insensitive Compare attribute and use that instead. Here is one that does case insensitive string comparisons:
http://stackoverflow.com/a/12822546/189818
It's not a feature in the default CompareAttribute because the CompareAttribute compares more than just strings.
shoab shah
Member
17 Points
44 Posts
make Compare Data annotation case insensitive
Feb 18, 2013 04:55 AM|LINK
Hi all,
By default the Compare annotation is case sensitive. wanna make case insensitive.
Or any mechanism through which the textbox value is manipulated for upper / lower case and then the Annotation works on it.
Thanks in advance.
DarrellNorto...
All-Star
86703 Points
9638 Posts
Moderator
MVP
Re: make Compare Data annotation case insensitive
Feb 18, 2013 01:06 PM|LINK
You could write your own case-insensitive Compare attribute and use that instead. Here is one that does case insensitive string comparisons:
http://stackoverflow.com/a/12822546/189818
It's not a feature in the default CompareAttribute because the CompareAttribute compares more than just strings.
Darrell Norton's Blog
Please click "Mark as Answer" if this helped you.