@@ -3392,9 +3392,10 @@ message StringRules {
3392
3392
}
3393
3393
];
3394
3394
3395
- // `uri` specifies that the field value must be a valid,
3396
- // absolute URI as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3). If the field value isn't a valid,
3397
- // absolute URI, an error message will be generated.
3395
+ // `uri` specifies that the field value must be a valid URI as defined by
3396
+ // [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3).
3397
+ //
3398
+ // If the field value isn't a valid URI, an error message will be generated.
3398
3399
//
3399
3400
// ```proto
3400
3401
// message MyString {
@@ -3415,19 +3416,24 @@ message StringRules {
3415
3416
}
3416
3417
];
3417
3418
3418
- // `uri_ref` specifies that the field value must be a valid URI
3419
- // as defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3) and may be either relative or absolute. If the
3420
- // field value isn't a valid URI, an error message will be generated.
3419
+ // `uri_ref` specifies that the field value must be a valid URI Reference as
3420
+ // defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-4.1).
3421
+ //
3422
+ // A URI Reference is either a [URI](https://tools.ietf.org/html/rfc3986#section-3),
3423
+ // or a [Relative Reference](https://tools.ietf.org/html/rfc3986#section-4.2).
3424
+ //
3425
+ // If the field value isn't a valid URI Reference, an error message will be
3426
+ // generated.
3421
3427
//
3422
3428
// ```proto
3423
3429
// message MyString {
3424
- // // value must be a valid URI
3430
+ // // value must be a valid URI Reference
3425
3431
// string value = 1 [(buf.validate.field).string.uri_ref = true];
3426
3432
// }
3427
3433
// ```
3428
3434
bool uri_ref = 18 [(predefined).cel = {
3429
3435
id : "string.uri_ref"
3430
- message : "value must be a valid URI"
3436
+ message : "value must be a valid URI Reference "
3431
3437
expression : "!rules.uri_ref || this.isUriRef()"
3432
3438
}];
3433
3439
0 commit comments