You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Conforms to the definition for a valid email address from the [HTML standard](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address).
3285
+
// Note that this standard willfully deviates from [RFC 5322](https://datatracker.ietf.org/doc/html/rfc5322),
3286
+
// which allows many unexpected forms of email addresses and will easily match
3287
+
// a typographical error.
3288
+
//
3283
3289
// If the field value isn't a valid email address, an error message will be generated.
3284
3290
//
3285
3291
// ```proto
@@ -3301,10 +3307,18 @@ message StringRules {
3301
3307
}
3302
3308
];
3303
3309
3304
-
// `hostname` specifies that the field value must be a valid
3305
-
// hostname as defined by [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034#section-3.5). This constraint doesn't support
3306
-
// internationalized domain names (IDNs). If the field value isn't a
3307
-
// valid hostname, an error message will be generated.
3310
+
// `hostname` specifies that the field value must be a valid hostname, for
3311
+
// example "foo.example.com".
3312
+
//
3313
+
// A valid hostname follows the rules below:
3314
+
// - The name consists of one or more labels, separated by a dot (".").
3315
+
// - Each label can be 1 to 63 alphanumeric characters.
3316
+
// - A label can contain hyphens ("-"), but must not start or end with a hyphen.
3317
+
// - The right-most label must not be digits only.
3318
+
// - The name can have a trailing dot—for example, "foo.example.com.".
3319
+
// - The name can be 253 characters at most, excluding the optional trailing dot.
3320
+
//
3321
+
// If the field value isn't a valid hostname, an error message will be generated.
3308
3322
//
3309
3323
// ```proto
3310
3324
// message MyString {
@@ -3325,8 +3339,15 @@ message StringRules {
3325
3339
}
3326
3340
];
3327
3341
3328
-
// `ip` specifies that the field value must be a valid IP
3329
-
// (v4 or v6) address, without surrounding square brackets for IPv6 addresses.
3342
+
// `ip` specifies that the field value must be a valid IP (v4 or v6) address.
3343
+
//
3344
+
// IPv4 addresses are expected in the dotted decimal format—for example, "192.168.5.21".
3345
+
// IPv6 addresses are expected in their text representation—for example, "::1",
3346
+
// or "2001:0DB8:ABCD:0012::0".
3347
+
//
3348
+
// Both formats are well-defined in the internet standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986).
3349
+
// Zone identifiers for IPv6 addresses (for example, "fe80::a%en1") are supported.
3350
+
//
3330
3351
// If the field value isn't a valid IP address, an error message will be
3331
3352
// generated.
3332
3353
//
@@ -3349,9 +3370,9 @@ message StringRules {
3349
3370
}
3350
3371
];
3351
3372
3352
-
// `ipv4` specifies that the field value must be a valid IPv4
3353
-
// address. If the field value isn't a valid IPv4 address, an error message
3354
-
// will be generated.
3373
+
// `ipv4` specifies that the field value must be a valid IPv4 address—for
3374
+
// example "192.168.5.21". If the field value isn't a valid IPv4 address, an
3375
+
// error message will be generated.
3355
3376
//
3356
3377
// ```proto
3357
3378
// message MyString {
@@ -3372,9 +3393,9 @@ message StringRules {
3372
3393
}
3373
3394
];
3374
3395
3375
-
// `ipv6` specifies that the field value must be a valid
3376
-
// IPv6 address, without surrounding square brackets. If the field value is
3377
-
// not a valid IPv6 address, an error message will be generated.
3396
+
// `ipv6` specifies that the field value must be a valid IPv6 address—for
3397
+
// example "::1", or "d7a:115c:a1e0:ab12:4843:cd96:626b:430b". If the field
3398
+
// value is not a valid IPv6 address, an error message will be generated.
3378
3399
//
3379
3400
// ```proto
3380
3401
// message MyString {
@@ -3395,8 +3416,11 @@ message StringRules {
3395
3416
}
3396
3417
];
3397
3418
3398
-
// `uri` specifies that the field value must be a valid URI as defined by
0 commit comments