added backend form validation