I don't use separate fields for day, month and year, but either a calendar control or a single field for a date, which includes validation simply by data type.
If you'd separate this the month validation is simple, unless you take the day into account, because if it is 31, not all months are valid, even 29 could depend on the year, when it comes to February because of leap days. So why not rely on the date type taking care of this?
PS: In the bigger picture, consider validating the whole form instead of validating each single control. Some checks to make a record valid also require to compare two fields, that can only be checked in a wholesome way anyway, a three part date entry is agood example, as already teased with some special cases, in the end any input could turn out to be right, when finally day, month, and year are entered, while the day, month, or year could result in a wrong date during the input of the date parts, so why waste individual checks? The limits 1-31, 1-12 and maybe even a lower and upper year (spinner control) could guide the use to not get into ridiculous values territory, but the date check in the end is an overall check whether DATE(year,month,day) is a valid date.
Chriss