completed validation on server and client side