diff --git a/proto/protovalidate-testing/buf/validate/conformance/cases/predefined_rules_proto2.proto b/proto/protovalidate-testing/buf/validate/conformance/cases/predefined_rules_proto2.proto index a7e03422..2f239916 100644 --- a/proto/protovalidate-testing/buf/validate/conformance/cases/predefined_rules_proto2.proto +++ b/proto/protovalidate-testing/buf/validate/conformance/cases/predefined_rules_proto2.proto @@ -41,7 +41,7 @@ extend buf.validate.Int32Rules { repeated int32 int32_abs_in_proto2 = 1161 [(buf.validate.predefined).cel = { id: "int32.abs_in.proto2" expression: "this in rule || this in rule.map(n, -n)" - message: "value must be in absolute value of list" + message: "must be in absolute value of list" }]; } @@ -49,7 +49,7 @@ extend buf.validate.Int64Rules { repeated google.protobuf.Int64Value int64_abs_in_proto2 = 1161 [(buf.validate.predefined).cel = { id: "int64.abs_in.proto2" expression: "this in rule || this in rule.map(n, -n)" - message: "value must be in absolute value of list" + message: "must be in absolute value of list" }]; } diff --git a/proto/protovalidate-testing/buf/validate/conformance/cases/predefined_rules_proto_editions.proto b/proto/protovalidate-testing/buf/validate/conformance/cases/predefined_rules_proto_editions.proto index 726b3e00..a3788307 100644 --- a/proto/protovalidate-testing/buf/validate/conformance/cases/predefined_rules_proto_editions.proto +++ b/proto/protovalidate-testing/buf/validate/conformance/cases/predefined_rules_proto_editions.proto @@ -41,7 +41,7 @@ extend buf.validate.Int32Rules { repeated int32 int32_abs_in_edition_2023 = 1162 [(buf.validate.predefined).cel = { id: "int32.abs_in.edition_2023" expression: "this in rule || this in rule.map(n, -n)" - message: "value must be in absolute value of list" + message: "must be in absolute value of list" }]; } @@ -49,7 +49,7 @@ extend buf.validate.Int64Rules { repeated google.protobuf.Int64Value int64_abs_in_edition_2023 = 1162 [(buf.validate.predefined).cel = { id: "int64.abs_in.edition_2023" expression: "this in rule || this in rule.map(n, -n)" - message: "value must be in absolute value of list" + message: "must be in absolute value of list" }]; } diff --git a/proto/protovalidate/buf/validate/validate.proto b/proto/protovalidate/buf/validate/validate.proto index ca1fc330..71fdabf8 100644 --- a/proto/protovalidate/buf/validate/validate.proto +++ b/proto/protovalidate/buf/validate/validate.proto @@ -556,7 +556,7 @@ message FloatRules { oneof greater_than { // `gt` requires the field value to be greater than the specified value // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -607,7 +607,7 @@ message FloatRules { // `gte` requires the field value to be greater than or equal to the specified // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field must be outside the + // or `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -771,7 +771,7 @@ message DoubleRules { oneof greater_than { // `gt` requires the field value to be greater than the specified value // (exclusive). If the value of `gt` is larger than a specified `lt` or `lte`, - // the range is reversed, and the field must be outside the specified + // the range is reversed, and the field value must be outside the specified // range. If the field value doesn't meet the required conditions, an error // message is generated. // @@ -822,7 +822,7 @@ message DoubleRules { // `gte` requires the field value to be greater than or equal to the specified // value (exclusive). If the value of `gte` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -985,7 +985,7 @@ message Int32Rules { oneof greater_than { // `gt` requires the field value to be greater than the specified value // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -1036,7 +1036,7 @@ message Int32Rules { // `gte` requires the field value to be greater than or equal to the specified value // (exclusive). If the value of `gte` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -1193,7 +1193,7 @@ message Int64Rules { oneof greater_than { // `gt` requires the field value to be greater than the specified value // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -1244,7 +1244,7 @@ message Int64Rules { // `gte` requires the field value to be greater than or equal to the specified // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field must be outside the + // or `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -1401,7 +1401,7 @@ message UInt32Rules { oneof greater_than { // `gt` requires the field value to be greater than the specified value // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -1452,7 +1452,7 @@ message UInt32Rules { // `gte` requires the field value to be greater than or equal to the specified // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field must be outside the + // or `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -1609,7 +1609,7 @@ message UInt64Rules { oneof greater_than { // `gt` requires the field value to be greater than the specified value // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -1660,7 +1660,7 @@ message UInt64Rules { // `gte` requires the field value to be greater than or equal to the specified // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field must be outside the + // or `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -1815,7 +1815,7 @@ message SInt32Rules { oneof greater_than { // `gt` requires the field value to be greater than the specified value // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -1866,7 +1866,7 @@ message SInt32Rules { // `gte` requires the field value to be greater than or equal to the specified // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field must be outside the + // or `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -2022,7 +2022,7 @@ message SInt64Rules { oneof greater_than { // `gt` requires the field value to be greater than the specified value // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -2073,7 +2073,7 @@ message SInt64Rules { // `gte` requires the field value to be greater than or equal to the specified // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field must be outside the + // or `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -2229,7 +2229,7 @@ message Fixed32Rules { oneof greater_than { // `gt` requires the field value to be greater than the specified value // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -2280,7 +2280,7 @@ message Fixed32Rules { // `gte` requires the field value to be greater than or equal to the specified // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field must be outside the + // or `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -2436,7 +2436,7 @@ message Fixed64Rules { oneof greater_than { // `gt` requires the field value to be greater than the specified value // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -2487,7 +2487,7 @@ message Fixed64Rules { // `gte` requires the field value to be greater than or equal to the specified // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field must be outside the + // or `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -2643,7 +2643,7 @@ message SFixed32Rules { oneof greater_than { // `gt` requires the field value to be greater than the specified value // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -2694,7 +2694,7 @@ message SFixed32Rules { // `gte` requires the field value to be greater than or equal to the specified // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field must be outside the + // or `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -2850,7 +2850,7 @@ message SFixed64Rules { oneof greater_than { // `gt` requires the field value to be greater than the specified value // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -2901,7 +2901,7 @@ message SFixed64Rules { // `gte` requires the field value to be greater than or equal to the specified // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field must be outside the + // or `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -3232,7 +3232,7 @@ message StringRules { expression: "this.contains(rules.not_contains) ? 'contains substring `%s`'.format([rules.not_contains]) : ''" }]; - // `in` specifies that the field must be equal to one of the specified + // `in` specifies that the field value must be equal to one of the specified // values. If the field value isn't one of the specified values, an error // message will be generated. // @@ -3264,7 +3264,7 @@ message StringRules { // `WellKnown` rules provide advanced rules against common string // patterns. oneof well_known { - // `email` specifies that the field must be a valid email address, for + // `email` specifies that the field value must be a valid email address, for // example "foo@example.com". // // 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). @@ -3293,7 +3293,7 @@ message StringRules { } ]; - // `hostname` specifies that the field must be a valid hostname, for + // `hostname` specifies that the field value must be a valid hostname, for // example "foo.example.com". // // A valid hostname follows the rules below: @@ -3325,7 +3325,7 @@ message StringRules { } ]; - // `ip` specifies that the field must be a valid IP (v4 or v6) address. + // `ip` specifies that the field value must be a valid IP (v4 or v6) address. // // IPv4 addresses are expected in the dotted decimal format—for example, "192.168.5.21". // IPv6 addresses are expected in their text representation—for example, "::1", @@ -3356,7 +3356,7 @@ message StringRules { } ]; - // `ipv4` specifies that the field must be a valid IPv4 address—for + // `ipv4` specifies that the field value must be a valid IPv4 address—for // example "192.168.5.21". If the field value isn't a valid IPv4 address, an // error message will be generated. // @@ -3379,7 +3379,7 @@ message StringRules { } ]; - // `ipv6` specifies that the field must be a valid IPv6 address—for + // `ipv6` specifies that the field value must be a valid IPv6 address—for // example "::1", or "d7a:115c:a1e0:ab12:4843:cd96:626b:430b". If the field // value is not a valid IPv6 address, an error message will be generated. // @@ -3402,7 +3402,7 @@ message StringRules { } ]; - // `uri` specifies that the field must be a valid URI, for example + // `uri` specifies that the field value must be a valid URI, for example // "https://example.com/foo/bar?baz=quux#frag". // // URI is defined in the internet standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986). @@ -3429,7 +3429,7 @@ message StringRules { } ]; - // `uri_ref` specifies that the field must be a valid URI Reference—either + // `uri_ref` specifies that the field value must be a valid URI Reference—either // a URI such as "https://example.com/foo/bar?baz=quux#frag", or a Relative // Reference such as "./foo/bar?query". // @@ -3452,7 +3452,7 @@ message StringRules { expression: "!rules.uri_ref || this.isUriRef()" }]; - // `address` specifies that the field must be either a valid hostname + // `address` specifies that the field value must be either a valid hostname // (for example, "example.com"), or a valid IP (v4 or v6) address (for example, // "192.168.0.1", or "::1"). If the field value isn't a valid hostname or IP, // an error message will be generated. @@ -3476,7 +3476,7 @@ message StringRules { } ]; - // `uuid` specifies that the field must be a valid UUID as defined by + // `uuid` specifies that the field value must be a valid UUID as defined by // [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2). If the // field value isn't a valid UUID, an error message will be generated. // @@ -3499,7 +3499,7 @@ message StringRules { } ]; - // `tuuid` (trimmed UUID) specifies that the field must be a valid UUID as + // `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as // defined by [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2) with all dashes // omitted. If the field value isn't a valid UUID without dashes, an error message // will be generated. @@ -3523,7 +3523,7 @@ message StringRules { } ]; - // `ip_with_prefixlen` specifies that the field must be a valid IP + // `ip_with_prefixlen` specifies that the field value must be a valid IP // (v4 or v6) address with prefix length—for example, "192.168.5.21/16" or // "2001:0DB8:ABCD:0012::F1/64". If the field value isn't a valid IP with // prefix length, an error message will be generated. @@ -3547,7 +3547,7 @@ message StringRules { } ]; - // `ipv4_with_prefixlen` specifies that the field must be a valid + // `ipv4_with_prefixlen` specifies that the field value must be a valid // IPv4 address with prefix length—for example, "192.168.5.21/16". If the // field value isn't a valid IPv4 address with prefix length, an error // message will be generated. @@ -3571,7 +3571,7 @@ message StringRules { } ]; - // `ipv6_with_prefixlen` specifies that the field must be a valid + // `ipv6_with_prefixlen` specifies that the field value must be a valid // IPv6 address with prefix length—for example, "2001:0DB8:ABCD:0012::F1/64". // If the field value is not a valid IPv6 address with prefix length, // an error message will be generated. @@ -3595,7 +3595,7 @@ message StringRules { } ]; - // `ip_prefix` specifies that the field must be a valid IP (v4 or v6) + // `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) // prefix—for example, "192.168.0.0/16" or "2001:0DB8:ABCD:0012::0/64". // // The prefix must have all zeros for the unmasked bits. For example, @@ -3624,7 +3624,7 @@ message StringRules { } ]; - // `ipv4_prefix` specifies that the field must be a valid IPv4 + // `ipv4_prefix` specifies that the field value must be a valid IPv4 // prefix, for example "192.168.0.0/16". // // The prefix must have all zeros for the unmasked bits. For example, @@ -3653,7 +3653,7 @@ message StringRules { } ]; - // `ipv6_prefix` specifies that the field must be a valid IPv6 prefix—for + // `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix—for // example, "2001:0DB8:ABCD:0012::0/64". // // The prefix must have all zeros for the unmasked bits. For example, @@ -3682,7 +3682,7 @@ message StringRules { } ]; - // `host_and_port` specifies that the field must be valid host/port + // `host_and_port` specifies that the field value must be a valid host/port // pair—for example, "example.com:8080". // // The host can be one of: @@ -3705,7 +3705,7 @@ message StringRules { } ]; - // `ulid` specifies that the field must be a valid ULID (Universally Unique + // `ulid` specifies that the field value must be a valid ULID (Universally Unique // Lexicographically Sortable Identifier) as defined by the [ULID specification](https://github.com/ulid/spec). // If the field value isn't a valid ULID, an error message will be generated. // @@ -3754,7 +3754,7 @@ message StringRules { bool protobuf_fqn = 37 [ (predefined).cel = { id: "string.protobuf_fqn" - message: "value must be a valid fully-qualified Protobuf name" + message: "must be a valid fully-qualified Protobuf name" expression: "!rules.protobuf_fqn || this == '' || this.matches('^[A-Za-z_][A-Za-z_0-9]*(\\\\.[A-Za-z_][A-Za-z_0-9]*)*$')" }, (predefined).cel = { @@ -3792,7 +3792,7 @@ message StringRules { bool protobuf_dot_fqn = 38 [ (predefined).cel = { id: "string.protobuf_dot_fqn" - message: "value must be a valid fully-qualified Protobuf name with a leading dot" + message: "must be a valid fully-qualified Protobuf name with a leading dot" expression: "!rules.protobuf_dot_fqn || this == '' || this.matches('^\\\\.[A-Za-z_][A-Za-z_0-9]*(\\\\.[A-Za-z_][A-Za-z_0-9]*)*$')" }, (predefined).cel = { @@ -4117,11 +4117,10 @@ message BytesRules { } ]; - // `uuid` ensures that the field `value` encodes the 128-bit UUID data as - // defined by [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2). - // The field must contain exactly 16 bytes - // representing the UUID. If the field value isn't a valid UUID, an error - // message will be generated. + // `uuid` ensures that the field value encodes 128-bit UUID data as defined + // by [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2). + // The field must contain exactly 16 bytes representing the UUID. If the + // field value isn't a valid UUID, an error message will be generated. // // ```proto // message MyBytes { @@ -4504,7 +4503,7 @@ message DurationRules { oneof greater_than { // `gt` requires the duration field value to be greater than the specified // value (exclusive). If the value of `gt` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field must be outside the + // or `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -4800,7 +4799,7 @@ message TimestampRules { oneof greater_than { // `gt` requires the timestamp field value to be greater than the specified // value (exclusive). If the value of `gt` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field must be outside the + // or `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // diff --git a/tools/internal/gen/buf/validate/conformance/cases/predefined_rules_proto2.pb.go b/tools/internal/gen/buf/validate/conformance/cases/predefined_rules_proto2.pb.go index 8f448edc..82f59d91 100644 --- a/tools/internal/gen/buf/validate/conformance/cases/predefined_rules_proto2.pb.go +++ b/tools/internal/gen/buf/validate/conformance/cases/predefined_rules_proto2.pb.go @@ -2243,13 +2243,13 @@ const file_buf_validate_conformance_cases_predefined_rules_proto2_proto_rawDesc "\x16float.abs_range.proto2\x12\x1bfloat value is out of range\x1a\x1dthis >= -rule && this <= ruleR\x13floatAbsRangeProto2:\xae\x01\n" + "\x17double_abs_range_proto2\x12\x19.buf.validate.DoubleRules\x18\x89\t \x01(\x01B[\xc2HX\n" + "V\n" + - "\x17double.abs_range.proto2\x12\x1cdouble value is out of range\x1a\x1dthis >= -rule && this <= ruleR\x14doubleAbsRangeProto2:\xb6\x01\n" + - "\x13int32_abs_in_proto2\x12\x18.buf.validate.Int32Rules\x18\x89\t \x03(\x05Bl\xc2Hi\n" + - "g\n" + - "\x13int32.abs_in.proto2\x12'value must be in absolute value of list\x1a'this in rule || this in rule.map(n, -n)R\x10int32AbsInProto2:\xd3\x01\n" + - "\x13int64_abs_in_proto2\x12\x18.buf.validate.Int64Rules\x18\x89\t \x03(\v2\x1b.google.protobuf.Int64ValueBl\xc2Hi\n" + - "g\n" + - "\x13int64.abs_in.proto2\x12'value must be in absolute value of list\x1a'this in rule || this in rule.map(n, -n)R\x10int64AbsInProto2:\x8e\x01\n" + + "\x17double.abs_range.proto2\x12\x1cdouble value is out of range\x1a\x1dthis >= -rule && this <= ruleR\x14doubleAbsRangeProto2:\xb0\x01\n" + + "\x13int32_abs_in_proto2\x12\x18.buf.validate.Int32Rules\x18\x89\t \x03(\x05Bf\xc2Hc\n" + + "a\n" + + "\x13int32.abs_in.proto2\x12!must be in absolute value of list\x1a'this in rule || this in rule.map(n, -n)R\x10int32AbsInProto2:\xcd\x01\n" + + "\x13int64_abs_in_proto2\x12\x18.buf.validate.Int64Rules\x18\x89\t \x03(\v2\x1b.google.protobuf.Int64ValueBf\xc2Hc\n" + + "a\n" + + "\x13int64.abs_in.proto2\x12!must be in absolute value of list\x1a'this in rule || this in rule.map(n, -n)R\x10int64AbsInProto2:\x8e\x01\n" + "\x12uint32_even_proto2\x12\x19.buf.validate.UInt32Rules\x18\x89\t \x01(\bBD\xc2HA\n" + "?\n" + "\x12uint32.even.proto2\x12\x18uint32 value is not even\x1a\x0fthis % 2u == 0uR\x10uint32EvenProto2:\x8e\x01\n" + diff --git a/tools/internal/gen/buf/validate/conformance/cases/predefined_rules_proto_editions.pb.go b/tools/internal/gen/buf/validate/conformance/cases/predefined_rules_proto_editions.pb.go index fac0b3a7..a2b6b5d0 100644 --- a/tools/internal/gen/buf/validate/conformance/cases/predefined_rules_proto_editions.pb.go +++ b/tools/internal/gen/buf/validate/conformance/cases/predefined_rules_proto_editions.pb.go @@ -2298,13 +2298,13 @@ const file_buf_validate_conformance_cases_predefined_rules_proto_editions_proto_ "\x1cfloat.abs_range.edition_2023\x12\x1bfloat value is out of range\x1a\x1dthis >= -rule && this <= ruleR\x18floatAbsRangeEdition2023:\xbf\x01\n" + "\x1ddouble_abs_range_edition_2023\x12\x19.buf.validate.DoubleRules\x18\x8a\t \x01(\x01Ba\xc2H^\n" + "\\\n" + - "\x1ddouble.abs_range.edition_2023\x12\x1cdouble value is out of range\x1a\x1dthis >= -rule && this <= ruleR\x19doubleAbsRangeEdition2023:\xc7\x01\n" + - "\x19int32_abs_in_edition_2023\x12\x18.buf.validate.Int32Rules\x18\x8a\t \x03(\x05Br\xc2Ho\n" + - "m\n" + - "\x19int32.abs_in.edition_2023\x12'value must be in absolute value of list\x1a'this in rule || this in rule.map(n, -n)R\x15int32AbsInEdition2023:\xe4\x01\n" + - "\x19int64_abs_in_edition_2023\x12\x18.buf.validate.Int64Rules\x18\x8a\t \x03(\v2\x1b.google.protobuf.Int64ValueBr\xc2Ho\n" + - "m\n" + - "\x19int64.abs_in.edition_2023\x12'value must be in absolute value of list\x1a'this in rule || this in rule.map(n, -n)R\x15int64AbsInEdition2023:\x9f\x01\n" + + "\x1ddouble.abs_range.edition_2023\x12\x1cdouble value is out of range\x1a\x1dthis >= -rule && this <= ruleR\x19doubleAbsRangeEdition2023:\xc1\x01\n" + + "\x19int32_abs_in_edition_2023\x12\x18.buf.validate.Int32Rules\x18\x8a\t \x03(\x05Bl\xc2Hi\n" + + "g\n" + + "\x19int32.abs_in.edition_2023\x12!must be in absolute value of list\x1a'this in rule || this in rule.map(n, -n)R\x15int32AbsInEdition2023:\xde\x01\n" + + "\x19int64_abs_in_edition_2023\x12\x18.buf.validate.Int64Rules\x18\x8a\t \x03(\v2\x1b.google.protobuf.Int64ValueBl\xc2Hi\n" + + "g\n" + + "\x19int64.abs_in.edition_2023\x12!must be in absolute value of list\x1a'this in rule || this in rule.map(n, -n)R\x15int64AbsInEdition2023:\x9f\x01\n" + "\x18uint32_even_edition_2023\x12\x19.buf.validate.UInt32Rules\x18\x8a\t \x01(\bBJ\xc2HG\n" + "E\n" + "\x18uint32.even.edition_2023\x12\x18uint32 value is not even\x1a\x0fthis % 2u == 0uR\x15uint32EvenEdition2023:\x9f\x01\n" + diff --git a/tools/internal/gen/buf/validate/validate.pb.go b/tools/internal/gen/buf/validate/validate.pb.go index 47776d9a..76e40723 100644 --- a/tools/internal/gen/buf/validate/validate.pb.go +++ b/tools/internal/gen/buf/validate/validate.pb.go @@ -1459,7 +1459,7 @@ type isFloatRules_GreaterThan interface { type FloatRules_Gt struct { // `gt` requires the field value to be greater than the specified value // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -1483,7 +1483,7 @@ type FloatRules_Gt struct { type FloatRules_Gte struct { // `gte` requires the field value to be greater than or equal to the specified // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field must be outside the + // or `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -1745,7 +1745,7 @@ type isDoubleRules_GreaterThan interface { type DoubleRules_Gt struct { // `gt` requires the field value to be greater than the specified value // (exclusive). If the value of `gt` is larger than a specified `lt` or `lte`, - // the range is reversed, and the field must be outside the specified + // the range is reversed, and the field value must be outside the specified // range. If the field value doesn't meet the required conditions, an error // message is generated. // @@ -1769,7 +1769,7 @@ type DoubleRules_Gt struct { type DoubleRules_Gte struct { // `gte` requires the field value to be greater than or equal to the specified // value (exclusive). If the value of `gte` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -2021,7 +2021,7 @@ type isInt32Rules_GreaterThan interface { type Int32Rules_Gt struct { // `gt` requires the field value to be greater than the specified value // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -2045,7 +2045,7 @@ type Int32Rules_Gt struct { type Int32Rules_Gte struct { // `gte` requires the field value to be greater than or equal to the specified value // (exclusive). If the value of `gte` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -2297,7 +2297,7 @@ type isInt64Rules_GreaterThan interface { type Int64Rules_Gt struct { // `gt` requires the field value to be greater than the specified value // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -2321,7 +2321,7 @@ type Int64Rules_Gt struct { type Int64Rules_Gte struct { // `gte` requires the field value to be greater than or equal to the specified // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field must be outside the + // or `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -2573,7 +2573,7 @@ type isUInt32Rules_GreaterThan interface { type UInt32Rules_Gt struct { // `gt` requires the field value to be greater than the specified value // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -2597,7 +2597,7 @@ type UInt32Rules_Gt struct { type UInt32Rules_Gte struct { // `gte` requires the field value to be greater than or equal to the specified // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field must be outside the + // or `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -2849,7 +2849,7 @@ type isUInt64Rules_GreaterThan interface { type UInt64Rules_Gt struct { // `gt` requires the field value to be greater than the specified value // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -2873,7 +2873,7 @@ type UInt64Rules_Gt struct { type UInt64Rules_Gte struct { // `gte` requires the field value to be greater than or equal to the specified // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field must be outside the + // or `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -3124,7 +3124,7 @@ type isSInt32Rules_GreaterThan interface { type SInt32Rules_Gt struct { // `gt` requires the field value to be greater than the specified value // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -3148,7 +3148,7 @@ type SInt32Rules_Gt struct { type SInt32Rules_Gte struct { // `gte` requires the field value to be greater than or equal to the specified // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field must be outside the + // or `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -3399,7 +3399,7 @@ type isSInt64Rules_GreaterThan interface { type SInt64Rules_Gt struct { // `gt` requires the field value to be greater than the specified value // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -3423,7 +3423,7 @@ type SInt64Rules_Gt struct { type SInt64Rules_Gte struct { // `gte` requires the field value to be greater than or equal to the specified // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field must be outside the + // or `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -3674,7 +3674,7 @@ type isFixed32Rules_GreaterThan interface { type Fixed32Rules_Gt struct { // `gt` requires the field value to be greater than the specified value // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -3698,7 +3698,7 @@ type Fixed32Rules_Gt struct { type Fixed32Rules_Gte struct { // `gte` requires the field value to be greater than or equal to the specified // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field must be outside the + // or `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -3949,7 +3949,7 @@ type isFixed64Rules_GreaterThan interface { type Fixed64Rules_Gt struct { // `gt` requires the field value to be greater than the specified value // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -3973,7 +3973,7 @@ type Fixed64Rules_Gt struct { type Fixed64Rules_Gte struct { // `gte` requires the field value to be greater than or equal to the specified // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field must be outside the + // or `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -4224,7 +4224,7 @@ type isSFixed32Rules_GreaterThan interface { type SFixed32Rules_Gt struct { // `gt` requires the field value to be greater than the specified value // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -4248,7 +4248,7 @@ type SFixed32Rules_Gt struct { type SFixed32Rules_Gte struct { // `gte` requires the field value to be greater than or equal to the specified // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field must be outside the + // or `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -4499,7 +4499,7 @@ type isSFixed64Rules_GreaterThan interface { type SFixed64Rules_Gt struct { // `gt` requires the field value to be greater than the specified value // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field must be outside the + // `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -4523,7 +4523,7 @@ type SFixed64Rules_Gt struct { type SFixed64Rules_Gte struct { // `gte` requires the field value to be greater than or equal to the specified // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field must be outside the + // or `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -4792,7 +4792,7 @@ type StringRules struct { // // ``` NotContains *string `protobuf:"bytes,23,opt,name=not_contains,json=notContains" json:"not_contains,omitempty"` - // `in` specifies that the field must be equal to one of the specified + // `in` specifies that the field value must be equal to one of the specified // values. If the field value isn't one of the specified values, an error // message will be generated. // @@ -5222,7 +5222,7 @@ type isStringRules_WellKnown interface { } type StringRules_Email struct { - // `email` specifies that the field must be a valid email address, for + // `email` specifies that the field value must be a valid email address, for // example "foo@example.com". // // 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). @@ -5244,7 +5244,7 @@ type StringRules_Email struct { } type StringRules_Hostname struct { - // `hostname` specifies that the field must be a valid hostname, for + // `hostname` specifies that the field value must be a valid hostname, for // example "foo.example.com". // // A valid hostname follows the rules below: @@ -5269,7 +5269,7 @@ type StringRules_Hostname struct { } type StringRules_Ip struct { - // `ip` specifies that the field must be a valid IP (v4 or v6) address. + // `ip` specifies that the field value must be a valid IP (v4 or v6) address. // // IPv4 addresses are expected in the dotted decimal format—for example, "192.168.5.21". // IPv6 addresses are expected in their text representation—for example, "::1", @@ -5293,7 +5293,7 @@ type StringRules_Ip struct { } type StringRules_Ipv4 struct { - // `ipv4` specifies that the field must be a valid IPv4 address—for + // `ipv4` specifies that the field value must be a valid IPv4 address—for // example "192.168.5.21". If the field value isn't a valid IPv4 address, an // error message will be generated. // @@ -5309,7 +5309,7 @@ type StringRules_Ipv4 struct { } type StringRules_Ipv6 struct { - // `ipv6` specifies that the field must be a valid IPv6 address—for + // `ipv6` specifies that the field value must be a valid IPv6 address—for // example "::1", or "d7a:115c:a1e0:ab12:4843:cd96:626b:430b". If the field // value is not a valid IPv6 address, an error message will be generated. // @@ -5325,7 +5325,7 @@ type StringRules_Ipv6 struct { } type StringRules_Uri struct { - // `uri` specifies that the field must be a valid URI, for example + // `uri` specifies that the field value must be a valid URI, for example // "https://example.com/foo/bar?baz=quux#frag". // // URI is defined in the internet standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986). @@ -5345,7 +5345,7 @@ type StringRules_Uri struct { } type StringRules_UriRef struct { - // `uri_ref` specifies that the field must be a valid URI Reference—either + // `uri_ref` specifies that the field value must be a valid URI Reference—either // a URI such as "https://example.com/foo/bar?baz=quux#frag", or a Relative // Reference such as "./foo/bar?query". // @@ -5368,7 +5368,7 @@ type StringRules_UriRef struct { } type StringRules_Address struct { - // `address` specifies that the field must be either a valid hostname + // `address` specifies that the field value must be either a valid hostname // (for example, "example.com"), or a valid IP (v4 or v6) address (for example, // "192.168.0.1", or "::1"). If the field value isn't a valid hostname or IP, // an error message will be generated. @@ -5385,7 +5385,7 @@ type StringRules_Address struct { } type StringRules_Uuid struct { - // `uuid` specifies that the field must be a valid UUID as defined by + // `uuid` specifies that the field value must be a valid UUID as defined by // [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2). If the // field value isn't a valid UUID, an error message will be generated. // @@ -5401,7 +5401,7 @@ type StringRules_Uuid struct { } type StringRules_Tuuid struct { - // `tuuid` (trimmed UUID) specifies that the field must be a valid UUID as + // `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as // defined by [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2) with all dashes // omitted. If the field value isn't a valid UUID without dashes, an error message // will be generated. @@ -5418,7 +5418,7 @@ type StringRules_Tuuid struct { } type StringRules_IpWithPrefixlen struct { - // `ip_with_prefixlen` specifies that the field must be a valid IP + // `ip_with_prefixlen` specifies that the field value must be a valid IP // (v4 or v6) address with prefix length—for example, "192.168.5.21/16" or // "2001:0DB8:ABCD:0012::F1/64". If the field value isn't a valid IP with // prefix length, an error message will be generated. @@ -5435,7 +5435,7 @@ type StringRules_IpWithPrefixlen struct { } type StringRules_Ipv4WithPrefixlen struct { - // `ipv4_with_prefixlen` specifies that the field must be a valid + // `ipv4_with_prefixlen` specifies that the field value must be a valid // IPv4 address with prefix length—for example, "192.168.5.21/16". If the // field value isn't a valid IPv4 address with prefix length, an error // message will be generated. @@ -5452,7 +5452,7 @@ type StringRules_Ipv4WithPrefixlen struct { } type StringRules_Ipv6WithPrefixlen struct { - // `ipv6_with_prefixlen` specifies that the field must be a valid + // `ipv6_with_prefixlen` specifies that the field value must be a valid // IPv6 address with prefix length—for example, "2001:0DB8:ABCD:0012::F1/64". // If the field value is not a valid IPv6 address with prefix length, // an error message will be generated. @@ -5469,7 +5469,7 @@ type StringRules_Ipv6WithPrefixlen struct { } type StringRules_IpPrefix struct { - // `ip_prefix` specifies that the field must be a valid IP (v4 or v6) + // `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) // prefix—for example, "192.168.0.0/16" or "2001:0DB8:ABCD:0012::0/64". // // The prefix must have all zeros for the unmasked bits. For example, @@ -5491,7 +5491,7 @@ type StringRules_IpPrefix struct { } type StringRules_Ipv4Prefix struct { - // `ipv4_prefix` specifies that the field must be a valid IPv4 + // `ipv4_prefix` specifies that the field value must be a valid IPv4 // prefix, for example "192.168.0.0/16". // // The prefix must have all zeros for the unmasked bits. For example, @@ -5513,7 +5513,7 @@ type StringRules_Ipv4Prefix struct { } type StringRules_Ipv6Prefix struct { - // `ipv6_prefix` specifies that the field must be a valid IPv6 prefix—for + // `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix—for // example, "2001:0DB8:ABCD:0012::0/64". // // The prefix must have all zeros for the unmasked bits. For example, @@ -5535,7 +5535,7 @@ type StringRules_Ipv6Prefix struct { } type StringRules_HostAndPort struct { - // `host_and_port` specifies that the field must be valid host/port + // `host_and_port` specifies that the field value must be a valid host/port // pair—for example, "example.com:8080". // // The host can be one of: @@ -5549,7 +5549,7 @@ type StringRules_HostAndPort struct { } type StringRules_Ulid struct { - // `ulid` specifies that the field must be a valid ULID (Universally Unique + // `ulid` specifies that the field value must be a valid ULID (Universally Unique // Lexicographically Sortable Identifier) as defined by the [ULID specification](https://github.com/ulid/spec). // If the field value isn't a valid ULID, an error message will be generated. // @@ -6056,11 +6056,10 @@ type BytesRules_Ipv6 struct { } type BytesRules_Uuid struct { - // `uuid` ensures that the field `value` encodes the 128-bit UUID data as - // defined by [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2). - // The field must contain exactly 16 bytes - // representing the UUID. If the field value isn't a valid UUID, an error - // message will be generated. + // `uuid` ensures that the field value encodes 128-bit UUID data as defined + // by [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2). + // The field must contain exactly 16 bytes representing the UUID. If the + // field value isn't a valid UUID, an error message will be generated. // // ```proto // @@ -6809,7 +6808,7 @@ type isDurationRules_GreaterThan interface { type DurationRules_Gt struct { // `gt` requires the duration field value to be greater than the specified // value (exclusive). If the value of `gt` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field must be outside the + // or `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -7223,7 +7222,7 @@ type isTimestampRules_GreaterThan interface { type TimestampRules_Gt struct { // `gt` requires the timestamp field value to be greater than the specified // value (exclusive). If the value of `gt` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field must be outside the + // or `lte`, the range is reversed, and the field value must be outside the // specified range. If the field value doesn't meet the required conditions, // an error message is generated. // @@ -8455,7 +8454,7 @@ const file_buf_validate_validate_proto_rawDesc = "" + "bool.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x123\n" + "\aexample\x18\x02 \x03(\bB\x19\xc2H\x16\n" + "\x14\n" + - "\fbool.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02\"\xdb?\n" + + "\fbool.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02\"\xcf?\n" + "\vStringRules\x12\x87\x01\n" + "\x05const\x18\x01 \x01(\tBq\xc2Hn\n" + "l\n" + @@ -8591,15 +8590,15 @@ const file_buf_validate_validate_proto_rawDesc = "" + "|\n" + "\vstring.ulid\x12\x14must be a valid ULID\x1aW!rules.ulid || this == '' || this.matches('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$')\n" + "Y\n" + - "\x11string.ulid_empty\x12)value is empty, which is not a valid ULID\x1a\x19!rules.ulid || this != ''H\x00R\x04ulid\x12\xe7\x02\n" + - "\fprotobuf_fqn\x18% \x01(\bB\xc1\x02\xc2H\xbd\x02\n" + - "\xb5\x01\n" + - "\x13string.protobuf_fqn\x123value must be a valid fully-qualified Protobuf name\x1ai!rules.protobuf_fqn || this == '' || this.matches('^[A-Za-z_][A-Za-z_0-9]*(\\\\.[A-Za-z_][A-Za-z_0-9]*)*$')\n" + + "\x11string.ulid_empty\x12)value is empty, which is not a valid ULID\x1a\x19!rules.ulid || this != ''H\x00R\x04ulid\x12\xe1\x02\n" + + "\fprotobuf_fqn\x18% \x01(\bB\xbb\x02\xc2H\xb7\x02\n" + + "\xaf\x01\n" + + "\x13string.protobuf_fqn\x12-must be a valid fully-qualified Protobuf name\x1ai!rules.protobuf_fqn || this == '' || this.matches('^[A-Za-z_][A-Za-z_0-9]*(\\\\.[A-Za-z_][A-Za-z_0-9]*)*$')\n" + "\x82\x01\n" + - "\x19string.protobuf_fqn_empty\x12Bvalue is empty, which is not a valid fully-qualified Protobuf name\x1a!!rules.protobuf_fqn || this != ''H\x00R\vprotobufFqn\x12\xa7\x03\n" + - "\x10protobuf_dot_fqn\x18& \x01(\bB\xfa\x02\xc2H\xf6\x02\n" + - "\xd3\x01\n" + - "\x17string.protobuf_dot_fqn\x12Fvalue must be a valid fully-qualified Protobuf name with a leading dot\x1ap!rules.protobuf_dot_fqn || this == '' || this.matches('^\\\\.[A-Za-z_][A-Za-z_0-9]*(\\\\.[A-Za-z_][A-Za-z_0-9]*)*$')\n" + + "\x19string.protobuf_fqn_empty\x12Bvalue is empty, which is not a valid fully-qualified Protobuf name\x1a!!rules.protobuf_fqn || this != ''H\x00R\vprotobufFqn\x12\xa1\x03\n" + + "\x10protobuf_dot_fqn\x18& \x01(\bB\xf4\x02\xc2H\xf0\x02\n" + + "\xcd\x01\n" + + "\x17string.protobuf_dot_fqn\x12@must be a valid fully-qualified Protobuf name with a leading dot\x1ap!rules.protobuf_dot_fqn || this == '' || this.matches('^\\\\.[A-Za-z_][A-Za-z_0-9]*(\\\\.[A-Za-z_][A-Za-z_0-9]*)*$')\n" + "\x9d\x01\n" + "\x1dstring.protobuf_dot_fqn_empty\x12Uvalue is empty, which is not a valid fully-qualified Protobuf name with a leading dot\x1a%!rules.protobuf_dot_fqn || this != ''H\x00R\x0eprotobufDotFqn\x12\xac\x05\n" + "\x10well_known_regex\x18\x18 \x01(\x0e2\x18.buf.validate.KnownRegexB\xe5\x04\xc2H\xe1\x04\n" + diff --git a/tools/protovalidate-conformance/internal/cases/cases_bytes.go b/tools/protovalidate-conformance/internal/cases/cases_bytes.go index 83f1cbf1..d848b5a8 100644 --- a/tools/protovalidate-conformance/internal/cases/cases_bytes.go +++ b/tools/protovalidate-conformance/internal/cases/cases_bytes.go @@ -108,7 +108,7 @@ func bytesSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("bytes.min_len"), RuleId: proto.String("bytes.min_len"), - Message: proto.String("value length must be at least 3 bytes"), + Message: proto.String("must be at least 3 bytes"), }), }, "max_len/valid": { @@ -125,7 +125,7 @@ func bytesSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("bytes.max_len"), RuleId: proto.String("bytes.max_len"), - Message: proto.String("value must be at most 5 bytes"), + Message: proto.String("must be at most 5 bytes"), }), }, "min/max_len/valid-01": { @@ -146,7 +146,7 @@ func bytesSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("bytes.min_len"), RuleId: proto.String("bytes.min_len"), - Message: proto.String("value length must be at least 3 bytes"), + Message: proto.String("must be at least 3 bytes"), }), }, "min/max_len/invalid/above": { @@ -155,7 +155,7 @@ func bytesSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("bytes.max_len"), RuleId: proto.String("bytes.max_len"), - Message: proto.String("value must be at most 5 bytes"), + Message: proto.String("must be at most 5 bytes"), }), }, "equal/min_len/max_len/valid": { @@ -168,7 +168,7 @@ func bytesSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("bytes.max_len"), RuleId: proto.String("bytes.max_len"), - Message: proto.String("value must be at most 5 bytes"), + Message: proto.String("must be at most 5 bytes"), }), }, "pattern/valid": { @@ -181,7 +181,7 @@ func bytesSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("bytes.pattern"), RuleId: proto.String("bytes.pattern"), - Message: proto.String("value must match regex pattern `^[\\x00-\\x7F]+$`"), + Message: proto.String("must match regex pattern `^[\\x00-\\x7F]+$`"), }), }, "pattern/invalid/empty": { @@ -190,7 +190,7 @@ func bytesSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("bytes.pattern"), RuleId: proto.String("bytes.pattern"), - Message: proto.String("value must match regex pattern `^[\\x00-\\x7F]+$`"), + Message: proto.String("must match regex pattern `^[\\x00-\\x7F]+$`"), }), }, "pattern/invalid/not_utf8": { @@ -211,7 +211,7 @@ func bytesSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("bytes.prefix"), RuleId: proto.String("bytes.prefix"), - Message: proto.String("value does not have prefix 99"), + Message: proto.String("does not have prefix 99"), }), }, "contains/valid": { @@ -228,7 +228,7 @@ func bytesSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("bytes.contains"), RuleId: proto.String("bytes.contains"), - Message: proto.String("value does not contain 626172"), + Message: proto.String("does not contain 626172"), }), }, "suffix/valid": { @@ -245,7 +245,7 @@ func bytesSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("bytes.suffix"), RuleId: proto.String("bytes.suffix"), - Message: proto.String("value does not have suffix 62757a7a"), + Message: proto.String("does not have suffix 62757a7a"), }), }, "suffix/case_sensitive/invalid": { @@ -254,7 +254,7 @@ func bytesSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("bytes.suffix"), RuleId: proto.String("bytes.suffix"), - Message: proto.String("value does not have suffix 62757a7a"), + Message: proto.String("does not have suffix 62757a7a"), }), }, "IP/valid/v4": { @@ -271,7 +271,7 @@ func bytesSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("bytes.ip"), RuleId: proto.String("bytes.ip"), - Message: proto.String("value must be a valid IP address"), + Message: proto.String("must be a valid IP address"), }), }, "IP/invalid/not_checked": { @@ -288,7 +288,7 @@ func bytesSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("bytes.ipv4"), RuleId: proto.String("bytes.ipv4"), - Message: proto.String("value must be a valid IPv4 address"), + Message: proto.String("must be a valid IPv4 address"), }), }, "IPv4/invalid/not_checked": { @@ -301,7 +301,7 @@ func bytesSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("bytes.ipv4"), RuleId: proto.String("bytes.ipv4"), - Message: proto.String("value must be a valid IPv4 address"), + Message: proto.String("must be a valid IPv4 address"), }), }, "IPv6/valid": { @@ -314,7 +314,7 @@ func bytesSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("bytes.ipv6"), RuleId: proto.String("bytes.ipv6"), - Message: proto.String("value must be a valid IPv6 address"), + Message: proto.String("must be a valid IPv6 address"), }), }, "IPv6/invalid/not_checked": { diff --git a/tools/protovalidate-conformance/internal/cases/cases_double.go b/tools/protovalidate-conformance/internal/cases/cases_double.go index 7752d98d..8e4cf41a 100644 --- a/tools/protovalidate-conformance/internal/cases/cases_double.go +++ b/tools/protovalidate-conformance/internal/cases/cases_double.go @@ -401,7 +401,7 @@ func doubleSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("double.finite"), RuleId: proto.String("double.finite"), - Message: proto.String("value must be finite"), + Message: proto.String("must be finite"), }), }, "finite/inf": { @@ -411,7 +411,7 @@ func doubleSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("double.finite"), RuleId: proto.String("double.finite"), - Message: proto.String("value must be finite")}), + Message: proto.String("must be finite")}), }, "finite/inf/not_checked": { Message: &cases.DoubleNotFinite{Val: math.Inf(1)}, @@ -424,7 +424,7 @@ func doubleSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("double.finite"), RuleId: proto.String("double.finite"), - Message: proto.String("value must be finite"), + Message: proto.String("must be finite"), }, ), }, diff --git a/tools/protovalidate-conformance/internal/cases/cases_duration.go b/tools/protovalidate-conformance/internal/cases/cases_duration.go index df0533b2..b42310ce 100644 --- a/tools/protovalidate-conformance/internal/cases/cases_duration.go +++ b/tools/protovalidate-conformance/internal/cases/cases_duration.go @@ -71,7 +71,7 @@ func durationSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("duration.const"), RuleId: proto.String("duration.const"), - Message: proto.String("value must equal 3s"), + Message: proto.String("must equal 3s"), }), }, "in/valid": { @@ -93,7 +93,7 @@ func durationSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("duration.in"), RuleId: proto.String("duration.in"), - Message: proto.String(`value must be in list [1s, 0.000001s]`), + Message: proto.String(`must be in list [1s, 0.000001s]`), }), }, "not in/valid": { @@ -115,7 +115,7 @@ func durationSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("duration.not_in"), RuleId: proto.String("duration.not_in"), - Message: proto.String(`value must not be in list [0s]`), + Message: proto.String(`must not be in list [0s]`), }), }, "lt/valid": { @@ -137,7 +137,7 @@ func durationSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("duration.lt"), RuleId: proto.String("duration.lt"), - Message: proto.String("value must be less than 0s"), + Message: proto.String("must be less than 0s"), }), }, "lt/invalid": { @@ -150,7 +150,7 @@ func durationSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("duration.lt"), RuleId: proto.String("duration.lt"), - Message: proto.String("value must be less than 0s"), + Message: proto.String("must be less than 0s"), }), }, "lte/valid": { @@ -215,7 +215,7 @@ func durationSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("duration.gt"), RuleId: proto.String("duration.gt"), - Message: proto.String("value must be greater than 0.000001s"), + Message: proto.String("must be greater than 0.000001s"), }), }, "gte/valid": { @@ -245,7 +245,7 @@ func durationSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("duration.gte"), RuleId: proto.String("duration.gte"), - Message: proto.String("value must be greater than or equal to 0.001s"), + Message: proto.String("must be greater than or equal to 0.001s"), }), }, "gt_lt/valid": { @@ -269,7 +269,7 @@ func durationSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("duration.gt"), RuleId: proto.String("duration.gt_lt"), - Message: proto.String("value must be greater than 0s and less than 1s"), + Message: proto.String("must be greater than 0s and less than 1s"), }), }, "gt_lt/invalid/below": { @@ -281,7 +281,7 @@ func durationSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("duration.gt"), RuleId: proto.String("duration.gt_lt"), - Message: proto.String("value must be greater than 0s and less than 1s"), + Message: proto.String("must be greater than 0s and less than 1s"), }), }, "gt_lt/invalid/max": { @@ -294,7 +294,7 @@ func durationSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("duration.gt"), RuleId: proto.String("duration.gt_lt"), - Message: proto.String("value must be greater than 0s and less than 1s"), + Message: proto.String("must be greater than 0s and less than 1s"), }), }, "gt_lt/invalid/min": { @@ -305,7 +305,7 @@ func durationSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("duration.gt"), RuleId: proto.String("duration.gt_lt"), - Message: proto.String("value must be greater than 0s and less than 1s"), + Message: proto.String("must be greater than 0s and less than 1s"), }), }, "gt_lt/exclusive/valid/empty": { @@ -337,7 +337,7 @@ func durationSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("duration.gt"), RuleId: proto.String("duration.gt_lt_exclusive"), - Message: proto.String("value must be greater than 1s or less than 0s"), + Message: proto.String("must be greater than 1s or less than 0s"), }), }, "gt_lt/exclusive/invalid/max": { @@ -350,7 +350,7 @@ func durationSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("duration.gt"), RuleId: proto.String("duration.gt_lt_exclusive"), - Message: proto.String("value must be greater than 1s or less than 0s"), + Message: proto.String("must be greater than 1s or less than 0s"), }), }, "gt_lt/exclusive/invalid/min": { @@ -361,7 +361,7 @@ func durationSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("duration.gt"), RuleId: proto.String("duration.gt_lt_exclusive"), - Message: proto.String("value must be greater than 1s or less than 0s"), + Message: proto.String("must be greater than 1s or less than 0s"), }), }, "gte_lte/valid": { @@ -398,7 +398,7 @@ func durationSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("duration.gte"), RuleId: proto.String("duration.gte_lte"), - Message: proto.String("value must be greater than or equal to 60s and less than or equal to 3600s"), + Message: proto.String("must be greater than or equal to 60s and less than or equal to 3600s"), }), }, "gte_lte/invalid/below": { @@ -411,7 +411,7 @@ func durationSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("duration.gte"), RuleId: proto.String("duration.gte_lte"), - Message: proto.String("value must be greater than or equal to 60s and less than or equal to 3600s"), + Message: proto.String("must be greater than or equal to 60s and less than or equal to 3600s"), }), }, "Ex gte_lte/valid/empty": { @@ -455,7 +455,7 @@ func durationSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("duration.gte"), RuleId: proto.String("duration.gte_lte_exclusive"), - Message: proto.String("value must be greater than or equal to 3600s or less than or equal to 60s"), + Message: proto.String("must be greater than or equal to 3600s or less than or equal to 60s"), }), }, "fields_with_other_fields/invalid_other_field": { @@ -464,7 +464,7 @@ func durationSuite() suites.Suite { Field: results.FieldPath("int_val"), Rule: results.FieldPath("int32.gt"), RuleId: proto.String("int32.gt"), - Message: proto.String("value must be greater than 16"), + Message: proto.String("must be greater than 16"), }), }, "example/valid": { diff --git a/tools/protovalidate-conformance/internal/cases/cases_field_mask.go b/tools/protovalidate-conformance/internal/cases/cases_field_mask.go index 5829f2f8..f4b30df3 100644 --- a/tools/protovalidate-conformance/internal/cases/cases_field_mask.go +++ b/tools/protovalidate-conformance/internal/cases/cases_field_mask.go @@ -62,7 +62,7 @@ func fieldMaskSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("field_mask.const"), RuleId: proto.String("field_mask.const"), - Message: proto.String("value must equal paths [a]"), + Message: proto.String("must equal paths [a]"), }), }, "in/valid": { diff --git a/tools/protovalidate-conformance/internal/cases/cases_float.go b/tools/protovalidate-conformance/internal/cases/cases_float.go index c283a223..f12c6822 100644 --- a/tools/protovalidate-conformance/internal/cases/cases_float.go +++ b/tools/protovalidate-conformance/internal/cases/cases_float.go @@ -411,7 +411,7 @@ func floatSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("float.finite"), RuleId: proto.String("float.finite"), - Message: proto.String("value must be finite"), + Message: proto.String("must be finite"), }), }, "finite/inf": { @@ -421,7 +421,7 @@ func floatSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("float.finite"), RuleId: proto.String("float.finite"), - Message: proto.String("value must be finite"), + Message: proto.String("must be finite"), }, ), }, @@ -436,7 +436,7 @@ func floatSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("float.finite"), RuleId: proto.String("float.finite"), - Message: proto.String("value must be finite"), + Message: proto.String("must be finite"), }, ), }, diff --git a/tools/protovalidate-conformance/internal/cases/cases_kitchensink.go b/tools/protovalidate-conformance/internal/cases/cases_kitchensink.go index b3be4be9..52d59916 100644 --- a/tools/protovalidate-conformance/internal/cases/cases_kitchensink.go +++ b/tools/protovalidate-conformance/internal/cases/cases_kitchensink.go @@ -43,25 +43,25 @@ func kitchenSinkSuite() suites.Suite { Field: results.FieldPath("val.bytes_val"), Rule: results.FieldPath("bytes.const"), RuleId: proto.String("bytes.const"), - Message: proto.String("value must be 0099"), + Message: proto.String("must be 0099"), }, &validate.Violation{ Field: results.FieldPath("val.double_in"), Rule: results.FieldPath("double.in"), RuleId: proto.String("double.in"), - Message: proto.String("value must be in list [456.789, 123]"), + Message: proto.String("must be in list [456.789, 123]"), }, &validate.Violation{ Field: results.FieldPath("val.enum_const"), Rule: results.FieldPath("enum.const"), RuleId: proto.String("enum.const"), - Message: proto.String("value must equal 2"), + Message: proto.String("must equal 2"), }, &validate.Violation{ Field: results.FieldPath("val.int_const"), Rule: results.FieldPath("int32.const"), RuleId: proto.String("int32.const"), - Message: proto.String("value must equal 5"), + Message: proto.String("must equal 5"), }, &validate.Violation{ Field: results.FieldPath("val.o"), @@ -78,7 +78,7 @@ func kitchenSinkSuite() suites.Suite { Field: results.FieldPath("val.const"), Rule: results.FieldPath("string.const"), RuleId: proto.String("string.const"), - Message: proto.String("value must equal `abcd`"), + Message: proto.String("must equal `abcd`"), }, ), }, @@ -89,49 +89,49 @@ func kitchenSinkSuite() suites.Suite { Field: results.FieldPath("val.another.bytes_val"), Rule: results.FieldPath("bytes.const"), RuleId: proto.String("bytes.const"), - Message: proto.String("value must be 0099"), + Message: proto.String("must be 0099"), }, &validate.Violation{ Field: results.FieldPath("val.bytes_val"), Rule: results.FieldPath("bytes.const"), RuleId: proto.String("bytes.const"), - Message: proto.String("value must be 0099"), + Message: proto.String("must be 0099"), }, &validate.Violation{ Field: results.FieldPath("val.another.double_in"), Rule: results.FieldPath("double.in"), RuleId: proto.String("double.in"), - Message: proto.String("value must be in list [456.789, 123]"), + Message: proto.String("must be in list [456.789, 123]"), }, &validate.Violation{ Field: results.FieldPath("val.double_in"), Rule: results.FieldPath("double.in"), RuleId: proto.String("double.in"), - Message: proto.String("value must be in list [456.789, 123]"), + Message: proto.String("must be in list [456.789, 123]"), }, &validate.Violation{ Field: results.FieldPath("val.another.enum_const"), Rule: results.FieldPath("enum.const"), RuleId: proto.String("enum.const"), - Message: proto.String("value must equal 2"), + Message: proto.String("must equal 2"), }, &validate.Violation{ Field: results.FieldPath("val.enum_const"), Rule: results.FieldPath("enum.const"), RuleId: proto.String("enum.const"), - Message: proto.String("value must equal 2"), + Message: proto.String("must equal 2"), }, &validate.Violation{ Field: results.FieldPath("val.another.int_const"), Rule: results.FieldPath("int32.const"), RuleId: proto.String("int32.const"), - Message: proto.String("value must equal 5"), + Message: proto.String("must equal 5"), }, &validate.Violation{ Field: results.FieldPath("val.int_const"), Rule: results.FieldPath("int32.const"), RuleId: proto.String("int32.const"), - Message: proto.String("value must equal 5"), + Message: proto.String("must equal 5"), }, &validate.Violation{ Field: results.FieldPath("val.o"), @@ -159,13 +159,13 @@ func kitchenSinkSuite() suites.Suite { Field: results.FieldPath("val.another.const"), Rule: results.FieldPath("string.const"), RuleId: proto.String("string.const"), - Message: proto.String("value must equal `abcd`"), + Message: proto.String("must equal `abcd`"), }, &validate.Violation{ Field: results.FieldPath("val.const"), Rule: results.FieldPath("string.const"), RuleId: proto.String("string.const"), - Message: proto.String("value must equal `abcd`"), + Message: proto.String("must equal `abcd`"), }, ), }, @@ -176,55 +176,55 @@ func kitchenSinkSuite() suites.Suite { Field: results.FieldPath("val.bool_const"), Rule: results.FieldPath("bool.const"), RuleId: proto.String("bool.const"), - Message: proto.String("value must equal false"), + Message: proto.String("must equal false"), }, &validate.Violation{ Field: results.FieldPath("val.bytes_val"), Rule: results.FieldPath("bytes.const"), RuleId: proto.String("bytes.const"), - Message: proto.String("value must be 0099"), + Message: proto.String("must be 0099"), }, &validate.Violation{ Field: results.FieldPath("val.nested.bytes_val"), Rule: results.FieldPath("bytes.const"), RuleId: proto.String("bytes.const"), - Message: proto.String("value must be 0099"), + Message: proto.String("must be 0099"), }, &validate.Violation{ Field: results.FieldPath("val.double_in"), Rule: results.FieldPath("double.in"), RuleId: proto.String("double.in"), - Message: proto.String("value must be in list [456.789, 123]"), + Message: proto.String("must be in list [456.789, 123]"), }, &validate.Violation{ Field: results.FieldPath("val.nested.double_in"), Rule: results.FieldPath("double.in"), RuleId: proto.String("double.in"), - Message: proto.String("value must be in list [456.789, 123]"), + Message: proto.String("must be in list [456.789, 123]"), }, &validate.Violation{ Field: results.FieldPath("val.enum_const"), Rule: results.FieldPath("enum.const"), RuleId: proto.String("enum.const"), - Message: proto.String("value must equal 2"), + Message: proto.String("must equal 2"), }, &validate.Violation{ Field: results.FieldPath("val.nested.enum_const"), Rule: results.FieldPath("enum.const"), RuleId: proto.String("enum.const"), - Message: proto.String("value must equal 2"), + Message: proto.String("must equal 2"), }, &validate.Violation{ Field: results.FieldPath("val.int_const"), Rule: results.FieldPath("int32.const"), RuleId: proto.String("int32.const"), - Message: proto.String("value must equal 5"), + Message: proto.String("must equal 5"), }, &validate.Violation{ Field: results.FieldPath("val.nested.int_const"), Rule: results.FieldPath("int32.const"), RuleId: proto.String("int32.const"), - Message: proto.String("value must equal 5"), + Message: proto.String("must equal 5"), }, &validate.Violation{ Field: results.FieldPath("val.o"), @@ -252,7 +252,7 @@ func kitchenSinkSuite() suites.Suite { Field: results.FieldPath("val.nested.const"), Rule: results.FieldPath("string.const"), RuleId: proto.String("string.const"), - Message: proto.String("value must equal `abcd`"), + Message: proto.String("must equal `abcd`"), }, ), }, @@ -269,43 +269,43 @@ func kitchenSinkSuite() suites.Suite { Field: results.FieldPath("val.bool_const"), Rule: results.FieldPath("bool.const"), RuleId: proto.String("bool.const"), - Message: proto.String("value must equal false"), + Message: proto.String("must equal false"), }, &validate.Violation{ Field: results.FieldPath("val.bytes_val"), Rule: results.FieldPath("bytes.const"), RuleId: proto.String("bytes.const"), - Message: proto.String("value must be 0099"), + Message: proto.String("must be 0099"), }, &validate.Violation{ Field: results.FieldPath("val.double_in"), Rule: results.FieldPath("double.in"), RuleId: proto.String("double.in"), - Message: proto.String("value must be in list [456.789, 123]"), + Message: proto.String("must be in list [456.789, 123]"), }, &validate.Violation{ Field: results.FieldPath("val.enum_const"), Rule: results.FieldPath("enum.const"), RuleId: proto.String("enum.const"), - Message: proto.String("value must equal 2"), + Message: proto.String("must equal 2"), }, &validate.Violation{ Field: results.FieldPath("val.float_val"), Rule: results.FieldPath("float.gt"), RuleId: proto.String("float.gt"), - Message: proto.String("value must be greater than 0"), + Message: proto.String("must be greater than 0"), }, &validate.Violation{ Field: results.FieldPath("val.float_const"), Rule: results.FieldPath("float.lt"), RuleId: proto.String("float.lt"), - Message: proto.String("value must be less than 8"), + Message: proto.String("must be less than 8"), }, &validate.Violation{ Field: results.FieldPath("val.int_const"), Rule: results.FieldPath("int32.const"), RuleId: proto.String("int32.const"), - Message: proto.String("value must equal 5"), + Message: proto.String("must equal 5"), }, &validate.Violation{ Field: results.FieldPath("val.o"), @@ -322,19 +322,19 @@ func kitchenSinkSuite() suites.Suite { Field: results.FieldPath("val.const"), Rule: results.FieldPath("string.const"), RuleId: proto.String("string.const"), - Message: proto.String("value must equal `abcd`"), + Message: proto.String("must equal `abcd`"), }, &validate.Violation{ Field: results.FieldPath("val.ts_val"), Rule: results.FieldPath("timestamp.gt"), RuleId: proto.String("timestamp.gt"), - Message: proto.String("value must be greater than 1970-01-01T00:00:07Z"), + Message: proto.String("must be greater than 1970-01-01T00:00:07Z"), }, &validate.Violation{ Field: results.FieldPath("val.rep_ts_val[0]"), Rule: results.FieldPath("repeated.items.timestamp.gte"), RuleId: proto.String("timestamp.gte"), - Message: proto.String("value must be greater than or equal to 1970-01-01T00:00:00.001Z"), + Message: proto.String("must be greater than or equal to 1970-01-01T00:00:00.001Z"), }, ), }, diff --git a/tools/protovalidate-conformance/internal/cases/cases_map.go b/tools/protovalidate-conformance/internal/cases/cases_map.go index 1e003ca1..459d5ff6 100644 --- a/tools/protovalidate-conformance/internal/cases/cases_map.go +++ b/tools/protovalidate-conformance/internal/cases/cases_map.go @@ -145,7 +145,7 @@ func mapSuite() suites.Suite { Field: results.FieldPath("val[1]"), Rule: results.FieldPath("map.keys.sint64.lt"), RuleId: proto.String("sint64.lt"), - Message: proto.String("value must be less than 0"), + Message: proto.String("must be less than 0"), ForKey: proto.Bool(true), }, ), @@ -157,7 +157,7 @@ func mapSuite() suites.Suite { Field: results.FieldPath("val[\"!@#$%^&*()\"]"), Rule: results.FieldPath("map.keys.string.pattern"), RuleId: proto.String("string.pattern"), - Message: proto.String("value does not match regex pattern `(?i)^[a-z0-9]+$`"), + Message: proto.String("does not match regex pattern `(?i)^[a-z0-9]+$`"), ForKey: proto.Bool(true), }, ), @@ -181,13 +181,13 @@ func mapSuite() suites.Suite { Field: results.FieldPath("val[\"a\"]"), Rule: results.FieldPath("map.values.string.min_len"), RuleId: proto.String("string.min_len"), - Message: proto.String("value length must be at least 3 characters"), + Message: proto.String("must be at least 3 characters"), }, &validate.Violation{ Field: results.FieldPath("val[\"b\"]"), Rule: results.FieldPath("map.values.string.min_len"), RuleId: proto.String("string.min_len"), - Message: proto.String("value length must be at least 3 characters"), + Message: proto.String("must be at least 3 characters"), }, ), }, @@ -198,7 +198,7 @@ func mapSuite() suites.Suite { Field: results.FieldPath("val[\"b\"]"), Rule: results.FieldPath("map.values.string.pattern"), RuleId: proto.String("string.pattern"), - Message: proto.String("value does not match regex pattern `(?i)^[a-z0-9]+$`"), + Message: proto.String("does not match regex pattern `(?i)^[a-z0-9]+$`"), }, ), }, @@ -213,7 +213,7 @@ func mapSuite() suites.Suite { Field: results.FieldPath("val[1].val"), Rule: results.FieldPath("string.min_len"), RuleId: proto.String("string.min_len"), - Message: proto.String("value length must be at least 3 characters"), + Message: proto.String("must be at least 3 characters"), }, ), }, diff --git a/tools/protovalidate-conformance/internal/cases/cases_message.go b/tools/protovalidate-conformance/internal/cases/cases_message.go index 17762ae9..85c81331 100644 --- a/tools/protovalidate-conformance/internal/cases/cases_message.go +++ b/tools/protovalidate-conformance/internal/cases/cases_message.go @@ -48,7 +48,7 @@ func messageSuite() suites.Suite { Field: results.FieldPath("val.const"), Rule: results.FieldPath("string.const"), RuleId: proto.String("string.const"), - Message: proto.String("value must equal `foo`"), + Message: proto.String("must equal `foo`"), }, ), }, @@ -59,7 +59,7 @@ func messageSuite() suites.Suite { Field: results.FieldPath("val.nested.const"), Rule: results.FieldPath("string.const"), RuleId: proto.String("string.const"), - Message: proto.String("value must equal `foo`"), + Message: proto.String("must equal `foo`"), }, ), }, @@ -132,7 +132,7 @@ func messageSuite() suites.Suite { Field: results.FieldPath("val.val"), Rule: results.FieldPath("int64.gt"), RuleId: proto.String("int64.gt"), - Message: proto.String("value must be greater than 0"), + Message: proto.String("must be greater than 0"), }, ), }, @@ -143,7 +143,7 @@ func messageSuite() suites.Suite { Field: results.FieldPath("val.val"), Rule: results.FieldPath("int64.gt"), RuleId: proto.String("int64.gt"), - Message: proto.String("value must be greater than 0"), + Message: proto.String("must be greater than 0"), }, ), }, diff --git a/tools/protovalidate-conformance/internal/cases/cases_predefined.go b/tools/protovalidate-conformance/internal/cases/cases_predefined.go index 565a895c..b6d65bd7 100644 --- a/tools/protovalidate-conformance/internal/cases/cases_predefined.go +++ b/tools/protovalidate-conformance/internal/cases/cases_predefined.go @@ -70,7 +70,7 @@ func predefinedSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("int32.[buf.validate.conformance.cases.int32_abs_in_proto2]"), RuleId: proto.String("int32.abs_in.proto2"), - Message: proto.String("value must be in absolute value of list"), + Message: proto.String("must be in absolute value of list"), }, ), }, @@ -85,7 +85,7 @@ func predefinedSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("int64.[buf.validate.conformance.cases.int64_abs_in_proto2]"), RuleId: proto.String("int64.abs_in.proto2"), - Message: proto.String("value must be in absolute value of list"), + Message: proto.String("must be in absolute value of list"), }, ), }, @@ -357,7 +357,7 @@ func predefinedSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("int32.[buf.validate.conformance.cases.int32_abs_in_proto2]"), RuleId: proto.String("int32.abs_in.proto2"), - Message: proto.String("value must be in absolute value of list"), + Message: proto.String("must be in absolute value of list"), }, ), }, @@ -372,7 +372,7 @@ func predefinedSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("int64.[buf.validate.conformance.cases.int64_abs_in_proto2]"), RuleId: proto.String("int64.abs_in.proto2"), - Message: proto.String("value must be in absolute value of list"), + Message: proto.String("must be in absolute value of list"), }, ), }, @@ -504,7 +504,7 @@ func predefinedSuite() suites.Suite { Field: results.FieldPath("val[1]"), Rule: results.FieldPath("repeated.items.int32.[buf.validate.conformance.cases.int32_abs_in_proto2]"), RuleId: proto.String("int32.abs_in.proto2"), - Message: proto.String("value must be in absolute value of list"), + Message: proto.String("must be in absolute value of list"), }, ), }, @@ -523,7 +523,7 @@ func predefinedSuite() suites.Suite { Field: results.FieldPath("val[1]"), Rule: results.FieldPath("repeated.items.int64.[buf.validate.conformance.cases.int64_abs_in_proto2]"), RuleId: proto.String("int64.abs_in.proto2"), - Message: proto.String("value must be in absolute value of list"), + Message: proto.String("must be in absolute value of list"), }, ), }, @@ -686,7 +686,7 @@ func predefinedSuite() suites.Suite { Field: results.FieldPath("a"), Rule: results.FieldPath("sint32.lt"), RuleId: proto.String("sint32.lt"), - Message: proto.String("value must be less than 28"), + Message: proto.String("must be less than 28"), }, ), }, @@ -757,7 +757,7 @@ func predefinedSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("int32.[buf.validate.conformance.cases.int32_abs_in_proto2]"), RuleId: proto.String("int32.abs_in.proto2"), - Message: proto.String("value must be in absolute value of list"), + Message: proto.String("must be in absolute value of list"), }, ), }, @@ -772,7 +772,7 @@ func predefinedSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("int64.[buf.validate.conformance.cases.int64_abs_in_edition_2023]"), RuleId: proto.String("int64.abs_in.edition_2023"), - Message: proto.String("value must be in absolute value of list"), + Message: proto.String("must be in absolute value of list"), }, ), }, @@ -1059,7 +1059,7 @@ func predefinedSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("int32.[buf.validate.conformance.cases.int32_abs_in_proto2]"), RuleId: proto.String("int32.abs_in.proto2"), - Message: proto.String("value must be in absolute value of list"), + Message: proto.String("must be in absolute value of list"), }, ), }, @@ -1074,7 +1074,7 @@ func predefinedSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("int64.[buf.validate.conformance.cases.int64_abs_in_proto2]"), RuleId: proto.String("int64.abs_in.proto2"), - Message: proto.String("value must be in absolute value of list"), + Message: proto.String("must be in absolute value of list"), }, ), }, @@ -1206,7 +1206,7 @@ func predefinedSuite() suites.Suite { Field: results.FieldPath("val[1]"), Rule: results.FieldPath("repeated.items.int32.[buf.validate.conformance.cases.int32_abs_in_proto2]"), RuleId: proto.String("int32.abs_in.proto2"), - Message: proto.String("value must be in absolute value of list"), + Message: proto.String("must be in absolute value of list"), }, ), }, @@ -1225,7 +1225,7 @@ func predefinedSuite() suites.Suite { Field: results.FieldPath("val[1]"), Rule: results.FieldPath("repeated.items.int64.[buf.validate.conformance.cases.int64_abs_in_proto2]"), RuleId: proto.String("int64.abs_in.proto2"), - Message: proto.String("value must be in absolute value of list"), + Message: proto.String("must be in absolute value of list"), }, ), }, @@ -1388,7 +1388,7 @@ func predefinedSuite() suites.Suite { Field: results.FieldPath("a"), Rule: results.FieldPath("sint32.lt"), RuleId: proto.String("sint32.lt"), - Message: proto.String("value must be less than 28"), + Message: proto.String("must be less than 28"), }, ), }, @@ -1459,7 +1459,7 @@ func predefinedSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("int32.[buf.validate.conformance.cases.int32_abs_in_edition_2023]"), RuleId: proto.String("int32.abs_in.edition_2023"), - Message: proto.String("value must be in absolute value of list"), + Message: proto.String("must be in absolute value of list"), }, ), }, @@ -1474,7 +1474,7 @@ func predefinedSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("int64.[buf.validate.conformance.cases.int64_abs_in_edition_2023]"), RuleId: proto.String("int64.abs_in.edition_2023"), - Message: proto.String("value must be in absolute value of list"), + Message: proto.String("must be in absolute value of list"), }, ), }, @@ -1761,7 +1761,7 @@ func predefinedSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("int32.[buf.validate.conformance.cases.int32_abs_in_edition_2023]"), RuleId: proto.String("int32.abs_in.edition_2023"), - Message: proto.String("value must be in absolute value of list"), + Message: proto.String("must be in absolute value of list"), }, ), }, @@ -1776,7 +1776,7 @@ func predefinedSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("int64.[buf.validate.conformance.cases.int64_abs_in_edition_2023]"), RuleId: proto.String("int64.abs_in.edition_2023"), - Message: proto.String("value must be in absolute value of list"), + Message: proto.String("must be in absolute value of list"), }, ), }, @@ -1908,7 +1908,7 @@ func predefinedSuite() suites.Suite { Field: results.FieldPath("val[1]"), Rule: results.FieldPath("repeated.items.int32.[buf.validate.conformance.cases.int32_abs_in_edition_2023]"), RuleId: proto.String("int32.abs_in.edition_2023"), - Message: proto.String("value must be in absolute value of list"), + Message: proto.String("must be in absolute value of list"), }, ), }, @@ -1927,7 +1927,7 @@ func predefinedSuite() suites.Suite { Field: results.FieldPath("val[1]"), Rule: results.FieldPath("repeated.items.int64.[buf.validate.conformance.cases.int64_abs_in_edition_2023]"), RuleId: proto.String("int64.abs_in.edition_2023"), - Message: proto.String("value must be in absolute value of list"), + Message: proto.String("must be in absolute value of list"), }, ), }, @@ -2090,7 +2090,7 @@ func predefinedSuite() suites.Suite { Field: results.FieldPath("a"), Rule: results.FieldPath("sint32.lt"), RuleId: proto.String("sint32.lt"), - Message: proto.String("value must be less than 28"), + Message: proto.String("must be less than 28"), }, ), }, diff --git a/tools/protovalidate-conformance/internal/cases/cases_repeated.go b/tools/protovalidate-conformance/internal/cases/cases_repeated.go index e5f5f71a..36e4f6ca 100644 --- a/tools/protovalidate-conformance/internal/cases/cases_repeated.go +++ b/tools/protovalidate-conformance/internal/cases/cases_repeated.go @@ -50,7 +50,7 @@ func repeatedSuite() suites.Suite { Field: results.FieldPath("val[0].val"), Rule: results.FieldPath("int64.gt"), RuleId: proto.String("int64.gt"), - Message: proto.String("value must be greater than 0"), + Message: proto.String("must be greater than 0"), }, ), }, @@ -73,7 +73,7 @@ func repeatedSuite() suites.Suite { Field: results.FieldPath("val[0].val"), Rule: results.FieldPath("int64.gt"), RuleId: proto.String("int64.gt"), - Message: proto.String("value must be greater than 0"), + Message: proto.String("must be greater than 0"), }, ), }, @@ -92,7 +92,7 @@ func repeatedSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("repeated.min_items"), RuleId: proto.String("repeated.min_items"), - Message: proto.String("value must contain at least 2 item(s)"), + Message: proto.String("must contain at least 2 item(s)"), }, ), }, @@ -103,7 +103,7 @@ func repeatedSuite() suites.Suite { Field: results.FieldPath("val[1].val"), Rule: results.FieldPath("int64.gt"), RuleId: proto.String("int64.gt"), - Message: proto.String("value must be greater than 0"), + Message: proto.String("must be greater than 0"), }, ), }, @@ -122,7 +122,7 @@ func repeatedSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("repeated.max_items"), RuleId: proto.String("repeated.max_items"), - Message: proto.String("value must contain no more than 3 item(s)"), + Message: proto.String("must contain no more than 3 item(s)"), }, ), }, @@ -145,7 +145,7 @@ func repeatedSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("repeated.min_items"), RuleId: proto.String("repeated.min_items"), - Message: proto.String("value must contain at least 2 item(s)"), + Message: proto.String("must contain at least 2 item(s)"), }, ), }, @@ -156,7 +156,7 @@ func repeatedSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("repeated.max_items"), RuleId: proto.String("repeated.max_items"), - Message: proto.String("value must contain no more than 4 item(s)"), + Message: proto.String("must contain no more than 4 item(s)"), }, ), }, @@ -171,7 +171,7 @@ func repeatedSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("repeated.min_items"), RuleId: proto.String("repeated.min_items"), - Message: proto.String("value must contain at least 3 item(s)"), + Message: proto.String("must contain at least 3 item(s)"), }, ), }, @@ -182,7 +182,7 @@ func repeatedSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("repeated.max_items"), RuleId: proto.String("repeated.max_items"), - Message: proto.String("value must contain no more than 3 item(s)"), + Message: proto.String("must contain no more than 3 item(s)"), }, ), }, @@ -251,7 +251,7 @@ func repeatedSuite() suites.Suite { Field: results.FieldPath("val[1]"), Rule: results.FieldPath("repeated.items.float.gt"), RuleId: proto.String("float.gt"), - Message: proto.String("value must be greater than 0"), + Message: proto.String("must be greater than 0"), }, ), }, @@ -262,7 +262,7 @@ func repeatedSuite() suites.Suite { Field: results.FieldPath("val[1]"), Rule: results.FieldPath("repeated.items.string.pattern"), RuleId: proto.String("string.pattern"), - Message: proto.String("value does not match regex pattern `(?i)^[a-z0-9]+$`"), + Message: proto.String("does not match regex pattern `(?i)^[a-z0-9]+$`"), }, ), }, @@ -273,7 +273,7 @@ func repeatedSuite() suites.Suite { Field: results.FieldPath("val[0]"), Rule: results.FieldPath("repeated.items.string.in"), RuleId: proto.String("string.in"), - Message: proto.String(`value must be in list [foo, bar]`), + Message: proto.String(`must be in list [foo, bar]`), }, ), }, @@ -288,7 +288,7 @@ func repeatedSuite() suites.Suite { Field: results.FieldPath("val[0]"), Rule: results.FieldPath("repeated.items.string.not_in"), RuleId: proto.String("string.not_in"), - Message: proto.String("value must not be in list [foo, bar]"), + Message: proto.String("must not be in list [foo, bar]"), }, ), }, @@ -303,7 +303,7 @@ func repeatedSuite() suites.Suite { Field: results.FieldPath("val[0]"), Rule: results.FieldPath("repeated.items.enum.in"), RuleId: proto.String("enum.in"), - Message: proto.String("value must be in list [0]"), + Message: proto.String("must be in list [0]"), }, ), }, @@ -318,7 +318,7 @@ func repeatedSuite() suites.Suite { Field: results.FieldPath("val[0]"), Rule: results.FieldPath("repeated.items.enum.not_in"), RuleId: proto.String("enum.not_in"), - Message: proto.String("value must not be in list [0]"), + Message: proto.String("must not be in list [0]"), }, ), }, @@ -333,7 +333,7 @@ func repeatedSuite() suites.Suite { Field: results.FieldPath("val[0]"), Rule: results.FieldPath("repeated.items.enum.in"), RuleId: proto.String("enum.in"), - Message: proto.String("value must be in list [0]"), + Message: proto.String("must be in list [0]"), }, ), }, @@ -348,7 +348,7 @@ func repeatedSuite() suites.Suite { Field: results.FieldPath("val[0]"), Rule: results.FieldPath("repeated.items.enum.not_in"), RuleId: proto.String("enum.not_in"), - Message: proto.String("value must not be in list [0]"), + Message: proto.String("must not be in list [0]"), }, ), }, @@ -405,7 +405,7 @@ func repeatedSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("repeated.min_items"), RuleId: proto.String("repeated.min_items"), - Message: proto.String("value must contain at least 1 item(s)"), + Message: proto.String("must contain at least 1 item(s)"), }, ), }, @@ -416,7 +416,7 @@ func repeatedSuite() suites.Suite { Field: results.FieldPath("val[0]"), Rule: results.FieldPath("repeated.items.string.len"), RuleId: proto.String("string.len"), - Message: proto.String("value length must be 3 characters"), + Message: proto.String("must be 3 characters"), }, ), }, @@ -431,7 +431,7 @@ func repeatedSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("repeated.min_items"), RuleId: proto.String("repeated.min_items"), - Message: proto.String("value must contain at least 1 item(s)"), + Message: proto.String("must contain at least 1 item(s)"), }, ), }, @@ -442,7 +442,7 @@ func repeatedSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("repeated.max_items"), RuleId: proto.String("repeated.max_items"), - Message: proto.String("value must contain no more than 3 item(s)"), + Message: proto.String("must contain no more than 3 item(s)"), }, ), }, @@ -465,7 +465,7 @@ func repeatedSuite() suites.Suite { Field: results.FieldPath("val[0]"), Rule: results.FieldPath("repeated.items.duration.gte"), RuleId: proto.String("duration.gte"), - Message: proto.String("value must be greater than or equal to 0.001s"), + Message: proto.String("must be greater than or equal to 0.001s"), }, ), }, diff --git a/tools/protovalidate-conformance/internal/cases/cases_sfixed32.go b/tools/protovalidate-conformance/internal/cases/cases_sfixed32.go index 14764897..d04a33ff 100644 --- a/tools/protovalidate-conformance/internal/cases/cases_sfixed32.go +++ b/tools/protovalidate-conformance/internal/cases/cases_sfixed32.go @@ -39,7 +39,7 @@ func sfixed32Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed32.const"), RuleId: proto.String("sfixed32.const"), - Message: proto.String("value must equal 1"), + Message: proto.String("must equal 1"), }, ), }, @@ -54,7 +54,7 @@ func sfixed32Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed32.in"), RuleId: proto.String("sfixed32.in"), - Message: proto.String("value must be in list [2, 3]"), + Message: proto.String("must be in list [2, 3]"), }, ), }, @@ -69,7 +69,7 @@ func sfixed32Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed32.not_in"), RuleId: proto.String("sfixed32.not_in"), - Message: proto.String("value must not be in list [0]"), + Message: proto.String("must not be in list [0]"), }, ), }, @@ -84,7 +84,7 @@ func sfixed32Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed32.lt"), RuleId: proto.String("sfixed32.lt"), - Message: proto.String("value must be less than 0"), + Message: proto.String("must be less than 0"), }, ), }, @@ -95,7 +95,7 @@ func sfixed32Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed32.lt"), RuleId: proto.String("sfixed32.lt"), - Message: proto.String("value must be less than 0"), + Message: proto.String("must be less than 0"), }, ), }, @@ -114,7 +114,7 @@ func sfixed32Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed32.lte"), RuleId: proto.String("sfixed32.lte"), - Message: proto.String("value must be less than or equal to 64"), + Message: proto.String("must be less than or equal to 64"), }, ), }, @@ -129,7 +129,7 @@ func sfixed32Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed32.gt"), RuleId: proto.String("sfixed32.gt"), - Message: proto.String("value must be greater than 16"), + Message: proto.String("must be greater than 16"), }, ), }, @@ -140,7 +140,7 @@ func sfixed32Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed32.gt"), RuleId: proto.String("sfixed32.gt"), - Message: proto.String("value must be greater than 16"), + Message: proto.String("must be greater than 16"), }, ), }, @@ -159,7 +159,7 @@ func sfixed32Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed32.gte"), RuleId: proto.String("sfixed32.gte"), - Message: proto.String("value must be greater than or equal to 8"), + Message: proto.String("must be greater than or equal to 8"), }, ), }, @@ -174,7 +174,7 @@ func sfixed32Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed32.gt"), RuleId: proto.String("sfixed32.gt_lt"), - Message: proto.String("value must be greater than 0 and less than 10"), + Message: proto.String("must be greater than 0 and less than 10"), }, ), }, @@ -185,7 +185,7 @@ func sfixed32Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed32.gt"), RuleId: proto.String("sfixed32.gt_lt"), - Message: proto.String("value must be greater than 0 and less than 10"), + Message: proto.String("must be greater than 0 and less than 10"), }, ), }, @@ -196,7 +196,7 @@ func sfixed32Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed32.gt"), RuleId: proto.String("sfixed32.gt_lt"), - Message: proto.String("value must be greater than 0 and less than 10"), + Message: proto.String("must be greater than 0 and less than 10"), }, ), }, @@ -207,7 +207,7 @@ func sfixed32Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed32.gt"), RuleId: proto.String("sfixed32.gt_lt"), - Message: proto.String("value must be greater than 0 and less than 10"), + Message: proto.String("must be greater than 0 and less than 10"), }, ), }, @@ -226,7 +226,7 @@ func sfixed32Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed32.gt"), RuleId: proto.String("sfixed32.gt_lt_exclusive"), - Message: proto.String("value must be greater than 10 or less than 0"), + Message: proto.String("must be greater than 10 or less than 0"), }, ), }, @@ -237,7 +237,7 @@ func sfixed32Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed32.gt"), RuleId: proto.String("sfixed32.gt_lt_exclusive"), - Message: proto.String("value must be greater than 10 or less than 0"), + Message: proto.String("must be greater than 10 or less than 0"), }, ), }, @@ -248,7 +248,7 @@ func sfixed32Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed32.gt"), RuleId: proto.String("sfixed32.gt_lt_exclusive"), - Message: proto.String("value must be greater than 10 or less than 0"), + Message: proto.String("must be greater than 10 or less than 0"), }, ), }, @@ -271,7 +271,7 @@ func sfixed32Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed32.gte"), RuleId: proto.String("sfixed32.gte_lte"), - Message: proto.String("value must be greater than or equal to 128 and less than or equal to 256"), + Message: proto.String("must be greater than or equal to 128 and less than or equal to 256"), }, ), }, @@ -282,7 +282,7 @@ func sfixed32Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed32.gte"), RuleId: proto.String("sfixed32.gte_lte"), - Message: proto.String("value must be greater than or equal to 128 and less than or equal to 256"), + Message: proto.String("must be greater than or equal to 128 and less than or equal to 256"), }, ), }, @@ -309,7 +309,7 @@ func sfixed32Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed32.gte"), RuleId: proto.String("sfixed32.gte_lte_exclusive"), - Message: proto.String("value must be greater than or equal to 256 or less than or equal to 128"), + Message: proto.String("must be greater than or equal to 256 or less than or equal to 128"), }, ), }, diff --git a/tools/protovalidate-conformance/internal/cases/cases_sfixed64.go b/tools/protovalidate-conformance/internal/cases/cases_sfixed64.go index d0c829f4..9948027b 100644 --- a/tools/protovalidate-conformance/internal/cases/cases_sfixed64.go +++ b/tools/protovalidate-conformance/internal/cases/cases_sfixed64.go @@ -39,7 +39,7 @@ func sfixed64Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed64.const"), RuleId: proto.String("sfixed64.const"), - Message: proto.String("value must equal 1"), + Message: proto.String("must equal 1"), }, ), }, @@ -54,7 +54,7 @@ func sfixed64Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed64.in"), RuleId: proto.String("sfixed64.in"), - Message: proto.String("value must be in list [2, 3]"), + Message: proto.String("must be in list [2, 3]"), }, ), }, @@ -69,7 +69,7 @@ func sfixed64Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed64.not_in"), RuleId: proto.String("sfixed64.not_in"), - Message: proto.String("value must not be in list [0]"), + Message: proto.String("must not be in list [0]"), }, ), }, @@ -84,7 +84,7 @@ func sfixed64Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed64.lt"), RuleId: proto.String("sfixed64.lt"), - Message: proto.String("value must be less than 0"), + Message: proto.String("must be less than 0"), }, ), }, @@ -95,7 +95,7 @@ func sfixed64Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed64.lt"), RuleId: proto.String("sfixed64.lt"), - Message: proto.String("value must be less than 0"), + Message: proto.String("must be less than 0"), }, ), }, @@ -114,7 +114,7 @@ func sfixed64Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed64.lte"), RuleId: proto.String("sfixed64.lte"), - Message: proto.String("value must be less than or equal to 64"), + Message: proto.String("must be less than or equal to 64"), }, ), }, @@ -129,7 +129,7 @@ func sfixed64Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed64.gt"), RuleId: proto.String("sfixed64.gt"), - Message: proto.String("value must be greater than 16"), + Message: proto.String("must be greater than 16"), }, ), }, @@ -140,7 +140,7 @@ func sfixed64Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed64.gt"), RuleId: proto.String("sfixed64.gt"), - Message: proto.String("value must be greater than 16"), + Message: proto.String("must be greater than 16"), }, ), }, @@ -159,7 +159,7 @@ func sfixed64Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed64.gte"), RuleId: proto.String("sfixed64.gte"), - Message: proto.String("value must be greater than or equal to 8"), + Message: proto.String("must be greater than or equal to 8"), }, ), }, @@ -174,7 +174,7 @@ func sfixed64Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed64.gt"), RuleId: proto.String("sfixed64.gt_lt"), - Message: proto.String("value must be greater than 0 and less than 10"), + Message: proto.String("must be greater than 0 and less than 10"), }, ), }, @@ -185,7 +185,7 @@ func sfixed64Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed64.gt"), RuleId: proto.String("sfixed64.gt_lt"), - Message: proto.String("value must be greater than 0 and less than 10"), + Message: proto.String("must be greater than 0 and less than 10"), }, ), }, @@ -196,7 +196,7 @@ func sfixed64Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed64.gt"), RuleId: proto.String("sfixed64.gt_lt"), - Message: proto.String("value must be greater than 0 and less than 10"), + Message: proto.String("must be greater than 0 and less than 10"), }, ), }, @@ -207,7 +207,7 @@ func sfixed64Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed64.gt"), RuleId: proto.String("sfixed64.gt_lt"), - Message: proto.String("value must be greater than 0 and less than 10"), + Message: proto.String("must be greater than 0 and less than 10"), }, ), }, @@ -226,7 +226,7 @@ func sfixed64Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed64.gt"), RuleId: proto.String("sfixed64.gt_lt_exclusive"), - Message: proto.String("value must be greater than 10 or less than 0"), + Message: proto.String("must be greater than 10 or less than 0"), }, ), }, @@ -237,7 +237,7 @@ func sfixed64Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed64.gt"), RuleId: proto.String("sfixed64.gt_lt_exclusive"), - Message: proto.String("value must be greater than 10 or less than 0"), + Message: proto.String("must be greater than 10 or less than 0"), }, ), }, @@ -248,7 +248,7 @@ func sfixed64Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed64.gt"), RuleId: proto.String("sfixed64.gt_lt_exclusive"), - Message: proto.String("value must be greater than 10 or less than 0"), + Message: proto.String("must be greater than 10 or less than 0"), }, ), }, @@ -271,7 +271,7 @@ func sfixed64Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed64.gte"), RuleId: proto.String("sfixed64.gte_lte"), - Message: proto.String("value must be greater than or equal to 128 and less than or equal to 256"), + Message: proto.String("must be greater than or equal to 128 and less than or equal to 256"), }, ), }, @@ -282,7 +282,7 @@ func sfixed64Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed64.gte"), RuleId: proto.String("sfixed64.gte_lte"), - Message: proto.String("value must be greater than or equal to 128 and less than or equal to 256"), + Message: proto.String("must be greater than or equal to 128 and less than or equal to 256"), }, ), }, @@ -309,7 +309,7 @@ func sfixed64Suite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("sfixed64.gte"), RuleId: proto.String("sfixed64.gte_lte_exclusive"), - Message: proto.String("value must be greater than or equal to 256 or less than or equal to 128"), + Message: proto.String("must be greater than or equal to 256 or less than or equal to 128"), }, ), }, diff --git a/tools/protovalidate-conformance/internal/cases/cases_strings.go b/tools/protovalidate-conformance/internal/cases/cases_strings.go index 5e8eb7a0..0d75bb33 100644 --- a/tools/protovalidate-conformance/internal/cases/cases_strings.go +++ b/tools/protovalidate-conformance/internal/cases/cases_strings.go @@ -99,7 +99,7 @@ func stringSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("string.len"), RuleId: proto.String("string.len"), - Message: proto.String("value length must be 3 characters"), + Message: proto.String("must be 3 characters"), }), }, "min_len/valid/equal": { diff --git a/tools/protovalidate-conformance/internal/cases/cases_wrapper.go b/tools/protovalidate-conformance/internal/cases/cases_wrapper.go index abbecc35..d6e36112 100644 --- a/tools/protovalidate-conformance/internal/cases/cases_wrapper.go +++ b/tools/protovalidate-conformance/internal/cases/cases_wrapper.go @@ -47,7 +47,7 @@ func wrapperSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("float.gt"), RuleId: proto.String("float.gt"), - Message: proto.String("value must be greater than 0"), + Message: proto.String("must be greater than 0"), }), }, "double/valid": { @@ -64,7 +64,7 @@ func wrapperSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("double.gt"), RuleId: proto.String("double.gt"), - Message: proto.String("value must be greater than 0"), + Message: proto.String("must be greater than 0"), }), }, "int64/valid": { @@ -81,7 +81,7 @@ func wrapperSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("int64.gt"), RuleId: proto.String("int64.gt"), - Message: proto.String("value must be greater than 0"), + Message: proto.String("must be greater than 0"), }), }, "int32/valid": { @@ -98,7 +98,7 @@ func wrapperSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("int32.gt"), RuleId: proto.String("int32.gt"), - Message: proto.String("value must be greater than 0"), + Message: proto.String("must be greater than 0"), }), }, "uint64/valid": { @@ -115,7 +115,7 @@ func wrapperSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("uint64.gt"), RuleId: proto.String("uint64.gt"), - Message: proto.String("value must be greater than 0"), + Message: proto.String("must be greater than 0"), }), }, "uint32/valid": { @@ -132,7 +132,7 @@ func wrapperSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("uint32.gt"), RuleId: proto.String("uint32.gt"), - Message: proto.String("value must be greater than 0"), + Message: proto.String("must be greater than 0"), }), }, "bool/valid": { @@ -149,7 +149,7 @@ func wrapperSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("bool.const"), RuleId: proto.String("bool.const"), - Message: proto.String("value must equal true"), + Message: proto.String("must equal true"), }), }, "string/valid": { @@ -166,7 +166,7 @@ func wrapperSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("string.suffix"), RuleId: proto.String("string.suffix"), - Message: proto.String("value does not have suffix `bar`"), + Message: proto.String("does not have suffix `bar`"), }), }, "bytes/valid": { @@ -183,7 +183,7 @@ func wrapperSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("bytes.min_len"), RuleId: proto.String("bytes.min_len"), - Message: proto.String("value length must be at least 3 bytes"), + Message: proto.String("must be at least 3 bytes"), }), }, "required/string/valid": { @@ -196,7 +196,7 @@ func wrapperSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("string.const"), RuleId: proto.String("string.const"), - Message: proto.String("value must equal `bar`"), + Message: proto.String("must equal `bar`"), }), }, "required/string/empty/invalid": { @@ -218,7 +218,7 @@ func wrapperSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("string.const"), RuleId: proto.String("string.const"), - Message: proto.String("value must equal ``"), + Message: proto.String("must equal ``"), }), }, "required/empty/string/empty/invalid": { @@ -239,7 +239,7 @@ func wrapperSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("string.uuid"), RuleId: proto.String("string.uuid"), - Message: proto.String("value must be a valid UUID"), + Message: proto.String("must be a valid UUID"), }), }, "required/float/valid": { @@ -252,7 +252,7 @@ func wrapperSuite() suites.Suite { Field: results.FieldPath("val"), Rule: results.FieldPath("float.gt"), RuleId: proto.String("float.gt"), - Message: proto.String("value must be greater than 0"), + Message: proto.String("must be greater than 0"), }), }, "required/float/empty/invalid": {