[Seaside] [Validation] Would like to use jqueryvalidation

Esteban Maringolo emaringolo at gmail.com
Tue Feb 5 21:43:02 UTC 2019


Just a minor fix.

If you're going to inline JS code directly the proper way to do it is
by using a JSStream.

So:

html
script: (JSStream on:
'$("#dataForm").validate();$("#enterZipCOde").rules( "add",
{minlength: 5, digits: true});’)

Regards,

Esteban A. Maringolo

El mar., 5 feb. 2019 a las 18:34, sergio ruiz (<sergio.rrd at gmail.com>) escribió:
>
> Perfect! i ended up cheating and doing:
>
> html
> script:
> '$("#dataForm").validate();$("#enterZipCOde").rules( "add", {minlength: 5, digits: true});’
>
> but i’ll clean that up..
>
> Thanks!
>
> On February 5, 2019 at 3:58:56 PM, Esteban Maringolo (emaringolo at gmail.com) wrote:
>
> Oh, sorry I assumed validate was already defined, you can then do:
>
> html script: ((html jQuery id: 'commentForm') call: 'validate').
>
> Or implement validate in JQueryInstance as follows:
>
> JQueryInstance>>#validate
> ^self call: 'validate'
>
> If you plan to use validate extensively I recommend you do the latter.
>
> Regards,
>
>
> Esteban A. Maringolo
>
>
>
> El mar., 5 feb. 2019 a las 17:44, sergio ruiz (<sergio.rrd at gmail.com>) escribió:
> >
> >
> > html script: (html jQuery id: 'commentForm') validate.
> >
> >
> > okay, on this, smalltalk doesn’t know what validate is..
> >
> > this validate method is coming from an external javascript library.. so smalltalk wouldn’t know about it..
> >
> >
> > ----
> > peace,
> > sergio
> > photographer, journalist, visionary
> >
> > Public Key: http://bit.ly/29z9fG0
> > #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
> > http://www.codeandmusic.com
> > http://www.twitter.com/sergio_101
> > http://www.facebook.com/sergio101
> > _______________________________________________
> > seaside mailing list
> > seaside at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> ----
> peace,
> sergio
> photographer, journalist, visionary
>
> Public Key: http://bit.ly/29z9fG0
> #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
> http://www.codeandmusic.com
> http://www.twitter.com/sergio_101
> http://www.facebook.com/sergio101
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


More information about the seaside mailing list