Adding basic form validation logic