Removed redundant form validation function