Completed corrections to form validation