add validation to activity