validating def