Ticket #3477 (closed bug: wontfix)
Validate Plugin - metadata messages influence behaviour
| Reported by: | pduijves | Owned by: | joern |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.3 |
| Component: | plugin | Version: | 1.2.6 |
| Keywords: | Validate Plugin metadata messages | Cc: | |
| Blocking: | Blocked by: |
Description (last modified by joern) (diff)
hi! i think i ran into a bug;
when i validate a form with the input field below, validate also triggers if the input is not numeric, though i don't want it to and don't tell it to.
<input type="text" id="addressb2" name="addressb2" value="" class="{validate:{required:true, messages:{required:'Street number is required'}}}"/>
adding the rule number:false does not help.
i found a workaround by breaking the word 'number' in the custom error message:
<input type="text" id="addressb2" name="addressb2" value="" class="{validate:{required:true, messages:{required:'Street <span>n</span>umber is required'}}}"/>
which could be a clue, that words in the custom message text are matching rules somewhere
thanks for the great plugin!
ps: i couldn't find a way to attach this message straight to the right plugin...
Change History
comment:3 Changed 5 years ago by pduijves
sorry, take 3, i meant:
i found a workaround by breaking the word 'number' in the custom error message:
<input type="text" id="addressb2" name="addressb2" value="" class="{validate:{required:true, messages:{required:'Street num<!---->ber is required'}}}"/>
comment:5 Changed 5 years ago by joern
- Status changed from new to closed
- Resolution set to wontfix
In this case using metadata with the class attribute doesn't work. There are plenty alternatives for specifying messages, or configure the validation plugin to search in a custom attribute for the rules/messages.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

...some html is filtered from the message. i meant:
i found a workaround by breaking the word 'number' in the custom error message:
<input type="text" id="addressb2" name="addressb2" value="" class="{validate:{required:true, messages:{required:'Street num ber is required'}}}"/>