add validation before posting