Added form validation to profile page.