Problem with jquery validation in rails

Hi,

i am using jquery validation, i used following code

$("#btn1").click(function(){

alert(“click”);
$("#validating").valid({
rules: {
“product_no”:{
required: true
}
},
messages: {
“product_no”:{
required: “Required”
}
}
}).element( “#bar-div” );
});

in order to handle validation by particular button i used button id
btn1 and validate will not work
inside button click so i am using valid

  1. it is not showing according to rules,message

  2. element("#bar-div") is not working, its validating whole form as i
    gave :class => :required in all textbox

is that any way to validate particular div with click action of button
for displaying validation messages

thanks,
-pab

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs