I'm developing a web application using a custom REST service. For user registration I need the user to provide a date of birth. There is a min and max value for the date of birth, which is known by the API.
The form's date of birth consists of 3 selectboxes, day, month, year, and has front-end validation in place, which will validate the date entered (and make sure the date exists, etc.).
I do not want to hard code the business rules for min/max age in the front end, as this would mean it's maintained on two separate locations. However, I have nothing in the API right now that provides this information (as a resource or so), and I'm also not sure if this is a logical thing to add for an API.
How should I retrieve this business rule information properly from a REST API?
Edit: Also, as I will need to generate the values within the year selectbox, I need to know the valid years. This makes it much like any value set (i.e. available user titles (Mr, Mrs) which in fact are resources that I get from the API). With that in mind, it would sound like a date-of-birth value set, which could theoretically be a list of all valid days (which would be insane), or the range that is valid.