before validating data