Skip to content

Commit

Permalink
Update design doc
Browse files Browse the repository at this point in the history
  • Loading branch information
kkawakami-cybozu committed Jul 29, 2024
1 parent 10e9f1b commit aa6c755
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cybozu/validate/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ are doing.
For Go, we will add `Validate() error` method to generated structs.
The error returned is not a gRPC error to avoid dependency on a specific
gRPC implementation. Distinct errors are also generated for each type of
validation/normalization which can be used in conjunction with `errors.Is`
by callers to take specific actions based the failed validation.
validation/normalization and can be used in conjunction with `errors.Is`
by callers to take specific actions based on certain validation failures.

These distinct errors are in the format of
These distinct errors are generally 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`.
Expand Down

0 comments on commit aa6c755

Please sign in to comment.