You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Tibor Blénessy <bl...@gmail.com> on 2010/10/30 10:09:12 UTC
[TRINIDAD] skipping client validation messages
Hi,
I am using Trinidad 1.2.13 and I encountered an issue with client side
validations. When there are more than one validator attached to one
input field only every second validation is shown. For example with
this input
<tr:inputText label="Your name" id="input1" value="#{bean.name}">
<sd:failValidator msg="1" />
<sd:failValidator msg="2" />
<sd:failValidator msg="3" />
</tr:inputText>
Only message 1 and 3 is shown, 2 is skipped (failValidator is custom
validator which always fails).
I believe that this bug is caused by code in Core.js in function
_validateInline on line 1478 (in current HEAD of repository)
// Loop through the messages for this input
for (var j=0; j < messages.length; j = j+2)
Why is loop skipping messages?
Any suggestions are very much appreciated. Thanks!
Tibor
Re: [TRINIDAD] skipping client validation messages
Posted by Tibor Blénessy <bl...@gmail.com>.
Please does anybody have any input on this? Should I create a JIRA issue?
Thanks!
Tibor Blenessy
On Sat, Oct 30, 2010 at 10:09, Tibor Blénessy <bl...@gmail.com> wrote:
> Hi,
>
> I am using Trinidad 1.2.13 and I encountered an issue with client side
> validations. When there are more than one validator attached to one
> input field only every second validation is shown. For example with
> this input
>
> <tr:inputText label="Your name" id="input1" value="#{bean.name}">
> <sd:failValidator msg="1" />
> <sd:failValidator msg="2" />
> <sd:failValidator msg="3" />
> </tr:inputText>
>
> Only message 1 and 3 is shown, 2 is skipped (failValidator is custom
> validator which always fails).
>
> I believe that this bug is caused by code in Core.js in function
> _validateInline on line 1478 (in current HEAD of repository)
>
> // Loop through the messages for this input
> for (var j=0; j < messages.length; j = j+2)
>
>
> Why is loop skipping messages?
>
> Any suggestions are very much appreciated. Thanks!
>
> Tibor
>