jQuery Validate - Modify Existing Script to Make Inputs Non-Case Sensitive

Job ID: 31749925

Budget: $10 – $30 USD

Overview: The script below works just fine with the exception of one nagging issue: it currently requires creating both upper and lowercase versions of values not wanted as field inputs.

Project Scope: Update script to eliminate the need to make both an uppercase and lowercase version of the same value (e.g., "Google" and "google").

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

<script type="text/javascript">

var prohibitedCompanies = [

"Google",
"google"

];

$.validator.addMethod('prohibitedCo', function(value, elem, param) {

return prohibitedCompanies.indexOf(value) < 0;

}, 'Company name prohibited from registering.');

</script>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Related categories: PHP JavaScript AJAX HTML jQuery / Prototype