Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Validation

  1. #1
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,711
    Thanks
    41
    Thanked 191 Times in 190 Posts

    Validation

    Hi all,
    I am trying to figure out how to make my expression validator validate all styles of the word "yellow"
    example
    Yellow
    YeLlOw
    etc...
    is there another way to do this rather than type in every possible combination?

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE

  • #2
    Regular Coder
    Join Date
    Apr 2009
    Posts
    244
    Thanks
    1
    Thanked 20 Times in 20 Posts
    Hey alykins,

    If you are using a Regex object, you can just append "/i" to your regular expression. Google "Regex + ignore case". If not, just convert your string to either upper or lower case. Don't type in every possible combination, that's just silly .

    Regards,
    Mike

  • Users who have thanked Mike_O for this post:

    alykins (06-02-2011)

  • #3
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,711
    Thanks
    41
    Thanked 191 Times in 190 Posts
    Some more detail on this (sorry wasn't in here before) I am developing on MS Visual Studio 10 and using their built in "regular expression validator"... now in the ValidationExpression I have [a-zA-Z] which according to all of the resources I have found should allow for all char a-z and A-Z but no matter what it throws me an error... so that is why i want to allow for any combo... so if joe schmoe types in AAron lYkins I want this to be valid... Thank you for your reply- it does give me an easy way to handle the data in my DB (haven't gotten that far, but if I waqnt uniform look in my DB i will have to do conversions in my string

    anyways... are you familiar (or anyone else for that matter) with VS <asp:RegularExpressionValidator> control object?

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •