adding validation logic for definition task and event definitions