jQuery validate - how do I ignore letter case?

Posted by Jamie on Stack Overflow See other posts from Stack Overflow or by Jamie
Published on 2011-02-22T23:24:19Z Indexed on 2011/02/22 23:24 UTC
Read the original article Hit count: 241

Probably a goofy question, but I can't seem to find anything in google land. I simply need one of my methods to ignore the case of the entered field. I am doing a city name match, but need both "Atlanta" and "atlanta" to be valid. How should I edit this to get the validation love that I need?

    jQuery.validator.addMethod("atlanta", function(value) {
    return value == "Atlanta"; //Need 'atlanta' to work too
}, '**Recipient must reside in Chicago City Limits**');

Pre thanks to any and all :)

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about validation