added validations to client,server and  database