Skip to content

[BUG] WKT Duration doc has incorrect examples #499

Description

@ash2k

Description

// google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"];

// google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"];

// google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"];

// google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]];

// google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]];

Some of the duration examples use a string. This doesn't actually work. None of the conformance protos use a string.

Steps to Reproduce

Expected Behavior

Docs should be accurate.

Actual Behavior

Docs are misleading.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions