Doesn't dojo already add support for this? I have a custom xslt transforming
integer-widgets to NumberTextBox dates to DateTextBox and so on. One thing I
was working on was to support server side validation errors. The only
solution I could come up for here, was to add a client side regexp that is
always false, but I thought "yuck!" every time I saw the code so I removed
it again ... I'll send you my xslt (even if it depends on some Java-Script I
wrote). It's really basic and only supports the usecases I used in my
application. But maybe it helps. Now please don't complain about the really
basic xslt ... I didn’t want to get lost in XSLT issues and wanted to
concentrate on the Dojo Support ... One thing I have to mention ... I user
TinyMCE as HTMLArea Widget.
I think generating the validation-output needed for client side-validation
shouldn't be a big problem, since it’s the same for almost all widgets the
class having to be patched should be the simple Widget base-classes. I would
volunteer implementing it, but only if it is really wanted.
XXXXXXXXXXXX trueforms_submitForm(this)trueforms_submitForm(this)checkedtrueforms_submitForm(this)forms_submitForm(this, ''); return false;
Von: Jeremy Quinn [mailto:firstname.lastname@example.org]
Gesendet: Montag, 14. Juli 2008 12:41
Betreff: Re: AW: Client-side validation in CForms
On 13 Jul 2008, at 13:13, Christofer Dutz wrote:
> When I was working on my first attempts to do exactly what you are
> trying to
> do (CForms using dojo 1.1 and client side validation), I ran into
> the same problem as you did. I too think it would be easily possible
> implement client and server-side validation using dojo. Even if it
> would not
> be possible to implement all.
> Unfortunately the fi-output is hard-coded into the widget class
> implementation and no validation information is sent. Making client-
> validation work, it would make it necessary to patch every single
> class to output this validation-data, but should be easy to
> I stopped my work on this, since I had doubt's anyone would be
> interested in
> a feature like this and the thought of having to maintain patches
> for so
> many classes let me drop that idea.
I had a look as well and did not fancy ploughing in to the code to add
this right now, as I have so much else to do before I can release the
client-side stuff (hence asking for volunteers .... )
What I am working on in the meantime is using the (existing)
perform basic datatype validation on the client. My hope is that
adding support for this now, will make it easier to add fuller
validation client-side in the future.
BTW. Christofer, I attempted to contact you earlier about the private
work you said you had been doing on Dojo 1.1, to see if I could roll
it into my work. If you are interested in contributing, please contact
> -----Ursprüngliche Nachricht-----
> Von: Jeremy Quinn [mailto:email@example.com]
> Gesendet: Mittwoch, 9. Juli 2008 17:17
> An: firstname.lastname@example.org
> Betreff: Client-side validation in CForms
> Hi All
> As you may know, I am working heavily on the revamp of Dojo on the
> client-side of CForms.
> In Dojo it is possible to perform quite a lot of validation on form
> fields. There is a partial match between the validation capabilities
> of CForms and those of Dojo. Several people have thought in the past
> that it would be good to have the same validation occur on both the
> server and the client.
> OTTOMH, the kind of validators we could probably make work in both
> places would be :
> can sort out any context differences)
> ATM however, no validation information is output by the form
> generation process. Datatypes are there (which I can initially use)
> but no validation.
> So my question is, would someone volunteer to either add the
> definition's validation tags to the output or help work out the
> cleanest approach to adding it?
> Many thanks
> regards Jeremy