required field error handling