client and server validations working together