Skip to content

Commit

Permalink
GPII-3083: Cleaned up remaining message key examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
the-t-in-rtf committed May 7, 2019
1 parent 9852dcd commit ed14449
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/gss.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,13 @@ shown here:
"dataPath": ["requiredField"],
"schemaPath": ["properties", "requiredField", "required"],
"rule": { "required": true },
"message": "validation-required-field-missing"
"message": "gpii.schema.messages.validationErrors.required"
},
{
"dataPath": ["deep", "booleanField"],
"schemaPath": ["properties", "deep", "properties", "booleanField", "type"],
"rule": { "type": "boolean" },
"message": "validation-invalid-field-type"
"message": "gpii.schema.messages.validationErrors.type"
}
]
}
Expand Down Expand Up @@ -171,12 +171,12 @@ var error = {
"dataPath": ["deep", "booleanField"],
"schemaPath": ["properties", "deep", "properties", "booleanField", "type"],
"rule": { "type": "boolean" },
"message": "validation-invalid-field-type"
"message": "gpii.schema.messages.validationErrors.type"
};

// This is simplified for illustration purposes, this would nearly always be delivered as part of a more complex bundle.
var messages = {
"validation-invalid-field-type": "The value supplied should be a(n) %rule.type."
"gpii.schema.messages.validationErrors.type": "The value supplied should be a(n) %rule.type."
};

var message = fluid.stringTemplate(messages[error.message], error); // The value supplied should be a(n) boolean.
Expand Down

0 comments on commit ed14449

Please sign in to comment.