Age Validation Module (21 Years of Age)

Contrib type: 
Complete and working
Failed code review


Latest version: 
Ubercart 1.x

I was looking for a module which would provide a simple method to verify that a user is 21 years of age before allowing them to checkout. I couldn't find one so I decided to make my own. The module is very simple and can be easily changed.

The module "UC Checkout Age Validate" (yeah I know I suck with names) places a checkbox under the "Email Address" on the Ubercart checkout page which asks the customer to verify that he/she is 21 years of age by checking the box. If the box is not checked and the user tries to progress to the next page in the checkout process, an error is returned explaining to the user that he/she must first validate his/her age.

If anyone sees any blatant problems with how I am doing this, please let me know! This is my first Drupal module, so I am definitely not error proof.

uc_checkout_agevalidate.zip1.21 KB