Use javax.validation.groups.Default to remove if/else when validate.