func (e VarValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}
	key := ""
	if e.key {
		key = "key for "
	}
	return fmt.Sprintf(
		"invalid %sVar.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}
Error satisfies the builtin error interface
package apisix
import (
	"bytes"
	"errors"
	"fmt"
	"net"
	"net/mail"
	"net/url"
	"regexp"
	"strings"
	"time"
	"unicode/utf8"
	"github.com/golang/protobuf/ptypes"
)
var (
	_ = bytes.MinRead
	_ = errors.New("")
	_ = fmt.Print
	_ = utf8.UTFMax
	_ = (*regexp.Regexp)(nil)
	_ = (*strings.Reader)(nil)
	_ = net.IPv4len
	_ = time.Duration(0)
	_ = (*url.URL)(nil)
	_ = (*mail.Address)(nil)
	_ = ptypes.DynamicAny{}
)
var _base_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
func (m *Var) Validate() error {
	if m == nil {
		return nil
	}
	if l := len(m.GetVars()); l < 2 || l > 4 {
		return VarValidationError{
			field:  "Vars",
			reason: "value must contain between 2 and 4 items, inclusive",
		}
	}
	return nil
}
type VarValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}
func (e VarValidationError) Field() string { return e.field }
func (e VarValidationError) Reason() string { return e.reason }
func (e VarValidationError) Cause() error { return e.cause }
func (e VarValidationError) Key() bool { return e.key }
func (e VarValidationError) ErrorName() string { return "VarValidationError" }