Skip to content

Commit

Permalink
fixup! Add note in design doc, and add _ in Err names
Browse files Browse the repository at this point in the history
  • Loading branch information
kkawakami-cybozu committed Jul 29, 2024
1 parent cffc54b commit ebf95af
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cybozu/validate/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ gRPC implementation. Distinct errors are also generated for each type of
message which can be used in conjunction with `errors.Is` by callers to
take specific actions based the failed validation.

These distinct errors are in the format of
`Err<Failed validation>_<Message Name>_<Field NAME>`. For example, failed
PRECIS username case mapped normalization in message `Strings` field `s4`
is `ErrPRECISUsernameCaseMapped_Strings_S4`.

[PGV]: https://github.com/bufbuild/protoc-gen-validate
[go-proto-validators]: https://github.com/mwitkow/go-proto-validators
[PRECIS]: https://www.rfc-editor.org/rfc/rfc8264.html

0 comments on commit ebf95af

Please sign in to comment.