Skip to content

Commit 0a5ce95

Browse files
committed
Fixed documentation on custom messages section. Javascript now valid.
1 parent 321b0c0 commit 0a5ce95

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

README.md

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -362,30 +362,31 @@ messages or ID messages.
362362
These custom messages are declared in this manner:
363363
```js
364364
jQuery("#formID2").validationEngine({'custom_error_messages' : {
365-
'#someId' : {
366-
'required': {
367-
'message': "This is a custom message that is only attached to the input with id 'someId' if it
368-
has the validation of 'required'. This will always display, even if it has other
369-
custom messages."
365+
'#someId' : {
366+
'required': {
367+
'message': "This is a custom message that is only attached to the input with id 'someId' if it
368+
has the validation of 'required'. This will always display, even if it has other
369+
custom messages."
370+
},
371+
'custom[min]': {
372+
'message': "This is a custom message that is only attached to the input with id 'someID' if it
373+
has the validation of 'custom[min[someNumber]]'. This will always display, even if
374+
it has other custom messages."
375+
}
376+
},
377+
'.someClass': {
378+
'equals': {
379+
'message': "This is a custom message that is only attached to inputs that have the class of
380+
'someClass' and the validation type of 'equals'. This will be displayed only on
381+
inputs without an ID message."
382+
}
383+
},
384+
'required' {
385+
'message': "This is a custom message that replaces the normal error message for the validation
386+
'required'. This only displays when there are no Class or ID messages."
370387
}
371-
,'custom[min]': {
372-
'message': "This is a custom message that is only attached to the input with id 'someID' if it
373-
has the validation of 'custom[min[someNumber]]'. This will always display, even if
374-
it has other custom messages."
375-
}
376-
},
377-
'.someClass': {
378-
'equals': {
379-
'message': "This is a custom message that is only attached to inputs that have the class of
380-
'someClass' and the validation type of 'equals'. This will be displayed only on
381-
inputs without an ID message."
382-
}
383-
},
384-
'required' {
385-
'message': "This is a custom message that replaces the normal error message for the validation
386-
'required'. This only displays when there are no Class or ID messages."
387388
}
388-
}
389+
});
389390
```
390391

391392

0 commit comments

Comments
 (0)