check for number of months

JS validation added to make sure we've got a valid number of months