addMessages(config)
Associates validation messages to property and associates HTTP messages to a context.
Returns
Not applicable.
Parameters
Name | Type | Description | Required |
config | object | The object containing properties to process the information in the messages. | ✅ |
Usage example
In this example, the API adds HTTP messages to a context.
addMessages({
messages: [
{
type: 'error',
message: 'Validation Error'
}
],
category: 'HTTP'
context: 'app/primary_2'
});
In this example, the API adds validation messages to the property of a context.
addMessages({
messages: [
{
type: 'info',
message: 'Info Message'
}
],
property: '.lastName'
context: 'app/primary_2'
});
Previous topic APIs in the MessageManager module Next topic clearMessages(config)