// Valid checks validity of rule
Valid checks validity of rule
// Valid checks validity of rule
func (t *TableRule) Valid() error {
	if len(t.SchemaPattern) == 0 {
		return errors.New("schema pattern of table route rule should not be empty")
	}
	if len(t.TargetSchema) == 0 {
		return errors.New("target schema of table route rule should not be empty")
	}
	return nil
}
func ( t * TableRule ) Valid ( ) error { if len ( t . SchemaPattern ) == 0 { return errors . New ( " " ) } if len ( t . TargetSchema ) == 0 { return errors . New ( " " ) } return nil }
Valid checks validity of rule
Valid checks validity of rule