Constructor
new ConstraintViolationMessage()
Properties:
Name | Type | Description |
---|---|---|
key |
string | the i18n translation key to use. It must map to the |
input-name |
string | the name of the input, used to insert into the message, e.g. "Title is required". |
server-generated |
boolean | if true, this indicates the element's HTML was generated on the server. This means that your CSS can target it for display in all cases. If this is not present, you may want to avoid showing this element if the form has not been submitted yet. Does not affect behavior. |
server-side |
boolean | if true, this indicates the element contains constraint violation messages from the server. Does not affect behavior. |
client-side |
boolean | if true, this indicates the element contains constraint violation messages from the client, however they may have been generated from the server, since the server may re-evaluate the client-side constraints. Does not affect behavior of this tag. |
Methods
(static) i18nKey(…keyPath)
Returns the I18N key used for front-end constraint violations. This is useful if you need to construct a key and want to follow Brut's conventions on how they are managed.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
keyPath |
String |
<repeatable> |
parts of the path of the key after the namespace that Brut manages. |
- Source: