Showing posts with label validation. Show all posts
Showing posts with label validation. Show all posts

Friday, August 31, 2012

Validating a User's Age in Rails

We ran across an interesting bug in our application recently: a user who was 18 years old exactly could not sign up for our service.  This happened only in our production environment (not staging, development or test) and when we manually tested a number of dates, a user who was 18 years and 7 days old could sign up, but a user who was 18 years and 6 days old could not.