func RoutingRulesValidator(rules []string) error {
	for _, rule := range rules {
		if err := defaultRuleValidator(rule); err != nil {
			return err
		}
	}
	return nil
}
RoutingRulesValidator is the default validator function for routing rules.
A valid rule must contain two dot.
package host
import (
	"regexp"
	"strings"
	sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)
const DefaultMaxCharacterLength = 64
var IsValidID = regexp.MustCompile(`^[a-zA-Z0-9\.\_\+\-\#\[\]\<\>]+$`).MatchString
var IsValidRule = regexp.MustCompile(`^(([a-zA-Z0-9\.\_\+\-\#\[\]\<\>]{1,64}|[*]),){2}([a-zA-Z0-9\.\_\+\-\#\[\]\<\>]{1,64}|[*])$`).MatchString
type ValidateFn func(string) error
func defaultIdentifierValidator(id string, min, max int) error {  
	if strings.TrimSpace(id) == "" {
		return sdkerrors.Wrap(ErrInvalidID, "identifier cannot be blank")
	}
	if strings.Contains(id, "/") {
		return sdkerrors.Wrapf(ErrInvalidID, "identifier %s cannot contain separator '/'", id)
	}
	if len(id) < min || len(id) > max {
		return sdkerrors.Wrapf(ErrInvalidID, "identifier %s has invalid length: %d, must be between %d-%d characters", id, len(id), min, max)
	}
	if !IsValidID(id) {
		return sdkerrors.Wrapf(
			ErrInvalidID,
			"identifier %s must contain only alphanumeric or the following characters: '.', '_', '+', '-', '#', '[', ']', '<', '>'",
			id,
		)
	}
	return nil
}
func defaultRuleValidator(rule string) error {
	if !IsValidRule(rule) {
		return sdkerrors.Wrapf(
			ErrInvalidRule,
			"rule %s must contain two ','",
			rule,
		)
	}
	return nil
}
func ClientIdentifierValidator(id string) error {
	return defaultIdentifierValidator(id, 9, DefaultMaxCharacterLength)
}