Better validation for user and case groups