func IsISBN13(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
	s := strings.Replace(strings.Replace(field.String(), "-", "", 4), " ", "", 4)
	if !iSBN13Regex.MatchString(s) {
		return false
	}
	var checksum int32
	var i int32
	factor := []int32{1, 3}
	for i = 0; i < 12; i++ {
		checksum += factor[i%2] * int32(s[i]-'0')
	}
	return (int32(s[12]-'0'))-((10-(checksum%10))%10) == 0
}
IsISBN13 is the validation function for validating if the field's value is a valid v13 ISBN.
NOTE: This is exposed for use within your own custom functions and not intended to be called directly.
package validator
import (
	"fmt"
	"net"
	"net/url"
	"reflect"
	"strings"
	"time"
	"unicode/utf8"
)
var bakedInAliasValidators = map[string]string{
	"iscolor": "hexcolor|rgb|rgba|hsl|hsla",
}
var bakedInValidators = map[string]Func{
	"required":     HasValue,
	"len":          HasLengthOf,
	"min":          HasMinOf,
	"max":          HasMaxOf,
	"eq":           IsEq,
	"ne":           IsNe,
	"lt":           IsLt,
	"lte":          IsLte,
	"gt":           IsGt,
	"gte":          IsGte,
	"eqfield":      IsEqField,
	"eqcsfield":    IsEqCrossStructField,
	"necsfield":    IsNeCrossStructField,
	"gtcsfield":    IsGtCrossStructField,
	"gtecsfield":   IsGteCrossStructField,
	"ltcsfield":    IsLtCrossStructField,
	"ltecsfield":   IsLteCrossStructField,
	"nefield":      IsNeField,
	"gtefield":     IsGteField,
	"gtfield":      IsGtField,
	"ltefield":     IsLteField,
	"ltfield":      IsLtField,
	"alpha":        IsAlpha,
	"alphanum":     IsAlphanum,
	"numeric":      IsNumeric,
	"number":       IsNumber,
	"hexadecimal":  IsHexadecimal,
	"hexcolor":     IsHEXColor,
	"rgb":          IsRGB,
	"rgba":         IsRGBA,
	"hsl":          IsHSL,
	"hsla":         IsHSLA,
	"email":        IsEmail,
	"url":          IsURL,
	"uri":          IsURI,
	"base64":       IsBase64,
	"contains":     Contains,
	"containsany":  ContainsAny,
	"containsrune": ContainsRune,
	"excludes":     Excludes,
	"excludesall":  ExcludesAll,
	"excludesrune": ExcludesRune,
	"isbn":         IsISBN,
	"isbn10":       IsISBN10,
	"isbn13":       IsISBN13,
	"uuid":         IsUUID,
	"uuid3":        IsUUID3,
	"uuid4":        IsUUID4,
	"uuid5":        IsUUID5,
	"ascii":        IsASCII,
	"printascii":   IsPrintableASCII,
	"multibyte":    HasMultiByteCharacter,
	"datauri":      IsDataURI,
	"latitude":     IsLatitude,
	"longitude":    IsLongitude,
	"ssn":          IsSSN,
	"ipv4":         IsIPv4,
	"ipv6":         IsIPv6,
	"ip":           IsIP,
	"cidrv4":       IsCIDRv4,
	"cidrv6":       IsCIDRv6,
	"cidr":         IsCIDR,
	"tcp4_addr":    IsTCP4AddrResolvable,
	"tcp6_addr":    IsTCP6AddrResolvable,
	"tcp_addr":     IsTCPAddrResolvable,
	"udp4_addr":    IsUDP4AddrResolvable,
	"udp6_addr":    IsUDP6AddrResolvable,
	"udp_addr":     IsUDPAddrResolvable,
	"ip4_addr":     IsIP4AddrResolvable,
	"ip6_addr":     IsIP6AddrResolvable,
	"ip_addr":      IsIPAddrResolvable,
	"unix_addr":    IsUnixAddrResolvable,
	"mac":          IsMAC,
}
func IsMAC(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
	_, err := net.ParseMAC(field.String())
	return err == nil
}
func IsCIDRv4(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
	ip, _, err := net.ParseCIDR(field.String())
	return err == nil && ip.To4() != nil
}
func IsCIDRv6(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
	ip, _, err := net.ParseCIDR(field.String())
	return err == nil && ip.To4() == nil
}
func IsCIDR(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
	_, _, err := net.ParseCIDR(field.String())
	return err == nil
}
func IsIPv4(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
	ip := net.ParseIP(field.String())
	return ip != nil && ip.To4() != nil
}
func IsIPv6(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
	ip := net.ParseIP(field.String())
	return ip != nil && ip.To4() == nil
}
func IsIP(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
	ip := net.ParseIP(field.String())
	return ip != nil
}
func IsSSN(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
	if field.Len() != 11 {
		return false
	}
	return sSNRegex.MatchString(field.String())
}
func IsLongitude(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
	return longitudeRegex.MatchString(field.String())
}
func IsLatitude(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
	return latitudeRegex.MatchString(field.String())
}
func IsDataURI(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
	uri := strings.SplitN(field.String(), ",", 2)
	if len(uri) != 2 {
		return false
	}
	if !dataURIRegex.MatchString(uri[0]) {
		return false
	}
	fld := reflect.ValueOf(uri[1])
	return IsBase64(v, topStruct, currentStructOrField, fld, fld.Type(), fld.Kind(), param)
}
func HasMultiByteCharacter(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
	if field.Len() == 0 {
		return true
	}
	return multibyteRegex.MatchString(field.String())
}
func IsPrintableASCII(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
	return printableASCIIRegex.MatchString(field.String())
}
func IsASCII(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
	return aSCIIRegex.MatchString(field.String())
}
func IsUUID5(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
	return uUID5Regex.MatchString(field.String())
}
func IsUUID4(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
	return uUID4Regex.MatchString(field.String())
}
func IsUUID3(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
	return uUID3Regex.MatchString(field.String())
}
func IsUUID(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
	return uUIDRegex.MatchString(field.String())
}
func IsISBN(v *Validate, topStruct reflect.Value, currentStructOrField reflect.Value, field reflect.Value, fieldType reflect.Type, fieldKind reflect.Kind, param string) bool {
	return IsISBN10(v, topStruct, currentStructOrField, field, fieldType, fieldKind, param) || IsISBN13(v, topStruct, currentStructOrField, field, fieldType, fieldKind, param)
}