validate the form information