add validation for rating