The following HTML attributes available in the plugin can be used:
<input name="user" required data-dj-validator="word,4,20" data-dj-validator-msg="Please fill the user!">
Attribute | Description | Example |
data-dj-validator |
Add a validation to field using the specified key (see the validators reference), if the value is unknown it will generate an error. |
data-dj-validator = "text,3,12" |
required |
The standard “required” HTML5 attribute is recognized and validates the required fields. |
required = ”required” |
data-dj-validator-group |
Specify a group of related fields under the value of this attribute. |
data-dj-validator-group = "languages" |
data-dj-validator-msg |
Define a custom validation message for the field, replacing the default message. |
data-dj-validator-msg = "The name is not valid!" |
data-input-group |
Insert the message as a child of parent element of the field (insert after is default), it is used to correct the position of the message in fields composed of several elements. The value used is irrelevant. |
data-input-group = "group" |