clear errors before validationg