Skip to content

Commit

Permalink
Use placeholders instead of tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
yevhenii-nadtochii committed Dec 9, 2024
1 parent 8e67e72 commit 0ea15a2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/proto/spine/options.proto
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ message GoesOption {

// The default error message used when the companion field specified in `with` is not present
// alongside the target field.
option (default_message) = "The field `%s` can only be set when the field `%s` is defined.";
option (default_message) = "The field `{fieldName}` can only be set when `{companionName}` field is defined.";

// The name of the companion field whose presence is required for this field to be valid.
string with = 1;
Expand All @@ -895,7 +895,7 @@ message GoesOption {

// A user-defined error message.
//
// The specified message may include the following tokens:
// The specified message may include the following placeholders:
// 1. `{fieldName}` – the name of the field to which this option is applied.
// 2. `{companionName}` – the name of the companion field specified in `with`.
//
Expand Down Expand Up @@ -1077,12 +1077,12 @@ message IfSetAgainOption {

// A user-defined error message.
//
// The specified message may include the following tokens:
// The specified message may include the following placeholders:
// 1. `{fieldName}` — the field name.
// 2. `{currentValue}` — the current field value.
// 3. `{proposedValue}` — the value that was attempted to be set.
//
// The tokens will be replaced at runtime when the error is constructed.
// The placeholders will be replaced at runtime when the error is constructed.
//
// Example: Using the `(set_once)` option.
//
Expand Down

0 comments on commit 0ea15a2

Please sign in to comment.