It's a hard problem but the key is that it needs to be on the client rather than on the server, because that's what can have any information on jurisdictions, local regulations, religions, or general parental preference.
For example, it would be insane if every website and blog in the world to had to run logic to detect and prevent Elbonian males under 16 lunar years from seeing ankles except on Thursdays.