validate create and update group