You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Yohan Yudanara <yo...@gmail.com> on 2011/12/20 06:22:22 UTC
How to invoke tapestry client side validation on one fields?
Hi,
I want to ask a question:
Client side validation by default works on "blur" event, but I've change
the form property using clientValidation="submit", so that client side
validation only triggered on submit.
However, I want to trigger client side validation on one particular field
to works on "blur" event.
Is it possible to do that?
Let's say I have this code:
this.accountInput = $("fieldNeedOnBlurValidation");
Event.observe(this.accountInput, 'blur', ???? <-- what should I put here to
trigger client-side validation only on this field?);
Thanks in advance..
Re: How to invoke tapestry client side validation on one fields?
Posted by Yohan Yudanara <yo...@gmail.com>.
Hi,
I've found the answer :)..It's very simple...
This is the answer:
Event.observe($(' fieldNeedOnBlurValidation '), 'blur', function(event) {
$('fieldNeedOnBlurValidation').getFieldEventManager().validateInput();
});
On Tue, Dec 20, 2011 at 12:22 PM, Yohan Yudanara
<yo...@gmail.com>wrote:
> Hi,
>
> I want to ask a question:
>
> Client side validation by default works on "blur" event, but I've change
> the form property using clientValidation="submit", so that client side
> validation only triggered on submit.
> However, I want to trigger client side validation on one particular field
> to works on "blur" event.
> Is it possible to do that?
>
> Let's say I have this code:
> this.accountInput = $("fieldNeedOnBlurValidation");
> Event.observe(this.accountInput, 'blur', ???? <-- what should I put here
> to trigger client-side validation only on this field?);
>
> Thanks in advance..
>
>
>