adds form validation
fixes a portion of the form validation