Fighting with editable & validation

Fighting with editable & validation

arnimarnim Posts: 5Questions: 0Answers: 0
edited November 2011 in Plug-ins
hello,

what's the best way to get validation with jeditable? i tried it as described there:

https://jquery-datatables-editable.googlecode.com/svn/trunk/inline-validation.html

but it's just not possible to pass parameters to cssclass so it's impossible to use f.e. minlength with this method.

then i tried to assign my own class and do the validation via delegate()

[code]
"aoColumns": [
cssclass:"class_user_test",
...
]
[/code]

this creates at runtime:

[code]


OK

[/code]

and i tried this to activate validation:

[code]
$(document).delegate(".class_user_test input", "click", function() {
$(".class_user_test").validate({
rules: {
name: {
required: true,
minlength: 2
}
},
messages: {
name: {
required: "We need your email address to contact you",
minlength: jQuery.format("At least {0} characters required!")
}
}
});
})
[/code]

any ideas why it's not working? or if there's a better way?

regards
arnim
This discussion has been closed.