Bug Tracker

Opened 8 years ago

Closed 8 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 joern)

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 8 years ago by pduijves

...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'}}}"/>

comment:2 Changed 8 years ago by flesler

  • Owner set to joern

comment:3 Changed 8 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&lt;!----&gt;ber is required'}}}"/>

comment:4 Changed 8 years ago by joern

  • Description modified (diff)

comment:5 Changed 8 years ago by joern

  • Resolution set to wontfix
  • Status changed from new to 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.

Note: See TracTickets for help on using tickets.