implemented client form validation