Opened 14 years ago
Closed 14 years ago
#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: | |
Blocked by: | Blocking: |
Description (last modified by )
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 (5)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
Owner: | set to joern |
---|
comment:3 Changed 14 years ago by
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:4 Changed 14 years ago by
Description: | modified (diff) |
---|
comment:5 Changed 14 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
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.
...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'}}}"/>