func (m *QRCodeFormat) ValidateFields(paths ...string) error {
	if m == nil {
		return nil
	}
	if len(paths) == 0 {
		paths = QRCodeFormatFieldPathsNested
	}
	for name, subs := range _processPaths(append(paths[:0:0], paths...)) {
		_ = subs
		switch name {
		case "name":
			if utf8.RuneCountInString(m.GetName()) > 100 {
				return QRCodeFormatValidationError{
					field:  "name",
					reason: "value length must be at most 100 runes",
				}
			}
		case "description":
			if utf8.RuneCountInString(m.GetDescription()) > 200 {
				return QRCodeFormatValidationError{
					field:  "description",
					reason: "value length must be at most 200 runes",
				}
			}
		case "field_mask":
			if v, ok := interface{}(m.GetFieldMask()).(interface{ ValidateFields(...string) error }); ok {
				if err := v.ValidateFields(subs...); err != nil {
					return QRCodeFormatValidationError{
						field:  "field_mask",
						reason: "embedded message failed validation",
						cause:  err,
					}
				}
			}
		default:
			return QRCodeFormatValidationError{
				field:  name,
				reason: "invalid field path",
			}
		}
	}
	return nil
}
ValidateFields checks the field values on QRCodeFormat with the rules
defined in the proto definition for this message. If any rules are
violated, an error is returned.
package ttnpb
import (
	"bytes"
	"errors"
	"fmt"
	"net"
	"net/mail"
	"net/url"
	"regexp"
	"strings"
	"time"
	"unicode/utf8"
	"github.com/gogo/protobuf/types"
)
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)
	_ = types.DynamicAny{}
)
var _qrcodegenerator_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}$")