# Making a registration form that requires user to be over 13 (COPPA compliant form)

**URL:** <https://www.ruby-forum.com/t/making-a-registration-form-that-requires-user-to-be-over-13-coppa-compliant-form/186440>\
**Category:** Rails\
**Created:** [April 7, 2010, 7:46am UTC](https://www.ruby-forum.com/t/making-a-registration-form-that-requires-user-to-be-over-13-coppa-compliant-form/186440 "2010-04-07T07:46:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![The\_programmer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/22d042/32.png) [@The\_programmer](https://www.ruby-forum.com/u/The_programmer)\
**Post date:** [April 7, 2010, 7:46am UTC](https://www.ruby-forum.com/t/making-a-registration-form-that-requires-user-to-be-over-13-coppa-compliant-form/186440/1 "2010-04-07T07:46:00Z")

</div>

Hi,  
In the U.S.A for anyone to have access to any site that allows you  
access to a chatroom, forum, anything that sends text over the  
internet you have to be over 13 unless everything everyone can say is  
from a pre-select menu.

Well, I don’t want to limit people’s freedom of speech but I do want  
to be compliant with the COPPA, so I’m trying to make a form where you  
select the day you were born, the month you were born, the year you  
were born and then if the combination equals that the person is under  
13 they aren’t allowed to sign up. I’m trying to remember the formula  
that’s used to figure out someones age by the day, I think it had  
something to do with how many milliseconds you’ve been alive…  
anyways if anyone knows the answer to my question and if you are  
generous enough to post any examples I would be very grateful.  
I will do my best to reply to any questions but I will not have much  
access to the internet as usual for the rest of the week.

thanks for your replies in advance.

---

<div class="post-metadata">

**Author:** ![The\_programmer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/22d042/32.png) [@The\_programmer](https://www.ruby-forum.com/u/The_programmer)\
**Post date:** [April 7, 2010, 8:29am UTC](https://www.ruby-forum.com/t/making-a-registration-form-that-requires-user-to-be-over-13-coppa-compliant-form/186440/2 "2010-04-07T08:29:19Z")

</div>

Assuming that date contains the borning date:

if date \< Date.today - 13.years

# Ok

else

# No

end

---

<div class="post-metadata">

**Author:** ![The\_programmer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/22d042/32.png) [@The\_programmer](https://www.ruby-forum.com/u/The_programmer)\
**Post date:** [April 10, 2010, 4:35am UTC](https://www.ruby-forum.com/t/making-a-registration-form-that-requires-user-to-be-over-13-coppa-compliant-form/186440/3 "2010-04-10T04:35:38Z")

</div>

Wow, that is so much easier than the insane formula I was trying to  
remember when I programmed in the evil language of PHP. Thank you so  
much!!

On Apr 6, 11:27 pm, Gianluca T.
