Added some form validation