February 24th, 2010
Note to self: When upgrading Passenger on OSX dont forget to update the /etc/apache2/httpd.conf file to point to the correct version of Passenger AKA mod_rails.
Duh! I’d upgraded to to Rails 3.0 beta and was getting erros that made me think I needed “rack-mount (0.4.0)” and not the latest version I had. I’m such a newb!
I upgraded to Passenger 2.2.10 and now it’s all working just fine after I updated the httpd.conf file :)
Posted in Uncategorized | No Comments »
July 14th, 2009
There’s an excellent JavaScript validation tool over Position Absolute which uses jQuery. However it doesnt provide any Credit Card validation and I needed some.
The standard test for a correct Credit Card number is to check it using the Luhn Formula. It’s straight forward to use and well documented and not that hard to do in JavaScript. So I dove into the code from Position Absolute and extended it directly.
You can download the amended file here: http://howboring.com/linkedfiles/jquery.validationEngine.js.zip
Installation:
Unzip the file and just replace your existing jquery.validationEngine.js file.
How to use it:
I added a validator called luhnCC. It works exactly the same as the existing mechanisms, so you just add a new class: class=”validate[luhnCC]” to your input element. Your final input element might look like this:
<input id=”creditcard” name=”creditcard” type=”text” class=”validate[luhnCC]“ />
There are a few more things I could do. I’ll probably add in some sort of Data-Mask as well as the facility to validate only certain types of cards. It’s basic as it stands but it might help someone out.
If you experience any problems or have questions please leave a note in the comments.
Posted in Javascript | No Comments »