[Seaside] Anybody get jquery.validate.js working?

Tim Murray tmurray at ecsorl.com
Tue Sep 28 14:04:59 UTC 2010


Hi List.

 

I am trying to get jquery.validate.js working for client side form
validation.

Websites are:

 

http://bassistance.de/jquery-plugins/jquery-plugin-validation/

and a demo here:

http://docs.jquery.com/Plugins/validation#Validate_forms_like_you.27ve_n
ever_been_validating_before.21

 

I have not gotten it to work yet, and am starting simple  by modeling
the demo from the above Plugins link.

 

In my form component in the updateRoot method, in addition to the
shipped JQuery libs, I add (per the example/demo)

 

anHtmlRoot

            addStyle:'* { font-family: Verdana; font-size: 96%; }

label { width: 10em; float: left; }

label.error { float: none; color: red; padding-left: .5em;
vertical-align: top; }

p { clear: both; }

.submit { margin-left: 12em; }

em { font-weight: bold; padding-right: 1em; vertical-align: top; }'.

 

 

anHtmlRoot

addScript:'  $(document).ready(function(){

    $("#registrationForm").validate();    //name modified to fit my
component form name.

  });'

 

 

 

One thing I noticed and am not sure if it is having an effect is that
when I render my input field like this:

 

renderLoginOn:html

html tableRow:[

 html tableData:[

  html 

    label

   for:'clogin';

   with:'Username'].

html tableData:[                                  

 html textInput            

  id:'login';

 name:'clogin';

 class:'required';

 on: #login of: self session user;                                  

 maxLength:64]]

 

the Seaside does not recognize the "name" directive for the textinput
and replaces it with an integer.

 

Thanks in advance.

 

t.          

            

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20100928/1c475e54/attachment.htm


More information about the seaside mailing list