Corrected bug in date/datetime form validation and added some inline docs