added form validation for homepage