add validation for every save, and modify the error msg in client side