added basic validation to the document forms