validator, error handling part 1