basic validation for the form