Thanks for your help Jörn. I finally figured out what my problem was.
The page doesn't load all the input elements in the form until the
user manually selects a year. In other words the rules get empty
values because there are no matching rules at the point where $
(function()...) is call.
Now I
Jörn thanks for all your help, I read some more of your comments on
the plugin page and I finally solved my problem with the code below
(just in case anyone runs into the same issue):
$.validator.addMethod(start, function(value, element, param){
Date.format = 'mmm. dd, ';
It seems as if the rules object is never being passed to validate().
From what I can see there are no rules when normalizeRules is being
called however the elements are being called correctly.
Would I need to call the compare function in a different form? I can't
see much difference on the way I
Replace this:
$(.tableform).validate({debug: true, options: rules});
with this:
$(.tableform).validate({debug: true, rules: rules});
Jörn
On Fri, Dec 19, 2008 at 4:00 PM, dfiguero dfigu...@gmail.com wrote:
So far I got:
$(function(){
$.validator.addMethod(compare, function(value, element,
So far I got:
$(function(){
$.validator.addMethod(compare, function(value, element, param){
Date.format = 'mmm. dd, ';
sdate = Date.fromString($(param[0]).val());
edate = Date.fromString($(param[1]).val());
return (sdate.getTime() = edate.getTime()) ||
You could generate the rules object.
var rules = {};
$(:input[name*=date-start]).each(function() {
rules[this.name] = { ... }
});
$(...).validate({options:rules});
Jörn
On Thu, Dec 18, 2008 at 3:01 PM, dfiguero dfigu...@gmail.com wrote:
Hi,
I'm trying to validate a form with a dynamic
Thanks Jörn I'll give it a try!
On Dec 18, 12:17 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com
wrote:
You could generate the rules object.
var rules = {};
$(:input[name*=date-start]).each(function() {
rules[this.name] = { ... }});
$(...).validate({options:rules});
Jörn
On Thu,
SeViR
Thanks I will try ASAP.
I dont know if this make sense, I am just thinking.
but the plugin core shouldnt indicate type=submit or should avoid it
because in this situation could bring problems with ajax and others submit
buttons into the main form. I am not sure about this.
But anyway
Mario Moura schrieb:
SeViR
Thanks I will try ASAP.
I dont know if this make sense, I am just thinking.
but the plugin core shouldnt indicate type=submit or should avoid it
because in this situation could bring problems with ajax and others
submit buttons into the main form. I am not sure
Jörn
Like I said I am not sure about this. Please I am not criticize anyone. I
love your Validation. Works Fine.
My form have a ajax button. Something like this
form enctype=multipart/form-data id=myform method=post
action=/send/invoice
input type=submit class=form-submit value=Attach
Mario Moura schrieb:
Jörn
Like I said I am not sure about this. Please I am not criticize
anyone. I love your Validation. Works Fine.
My form have a ajax button. Something like this
form enctype=multipart/form-data id=myform method=post
action=/send/invoice
input type=submit
Jörn Zaefferer escribió:
howa schrieb:
Hello, anyone has idea how to do dynamic form validation?
e.g. using
http://bassistance.de/jquery-plugins/jquery-plugin-validation/
input name=t1 type=text /
input name=t2 type=text /
I only want to check for required field for t2 ONLY if t1 is
Mario Moura escribió:
Hi SeVir and Folks
My form have a ajax button. Ajax button always is type=submit so I
tested ValidationAide and Jquery Validation (bassistance.de
http://bassistance.de)
Both plugins have the following bad behavior.
When I click in Ajax Button (value=Attach
Hi SeVir and Jörn,
Yes I was thinking about this tonight. I need avoid the click event.
$(#attach-button).each(function(){
$(this).bind(click, function(){
$(#node-form)[0].submit();
return false;
});
});
I tested your function but I can
Mario Moura schrieb:
Yes I was thinking about this tonight. I need avoid the click event.
$(#attach-button).each(function(){
...
each ID are FALSE ;)
ID are uniq!!!
try so:
$(.attach-button).each(function(){
And give a Class
--
Viele Grüße, Olaf
Mario Moura escribió:
Hi SeVir and Jörn,
Yes I was thinking about this tonight. I need avoid the click event.
$(#attach-button).each(function(){
$(this).bind(click, function(){
$(#node-form)[0].submit();
return false;
});
});
First,
Hi SeVir and Folks
My form have a ajax button. Ajax button always is type=submit so I tested
ValidationAide and Jquery Validation (bassistance.de)
Both plugins have the following bad behavior.
When I click in Ajax Button (value=Attach id=attach-button
name=attach) both think that I am trying
howa schrieb:
Hello, anyone has idea how to do dynamic form validation?
e.g. using http://bassistance.de/jquery-plugins/jquery-plugin-validation/
input name=t1 type=text /
input name=t2 type=text /
I only want to check for required field for t2 ONLY if t1 is equal to
some value
e.g.
If
I suppose that you need a custom rule due to validation plugin don't
support relations
between fields.
With jQuery.YAV (http://jquery.com/plugins/project/jquery_yav) I can do:
input id=t1 name=t1 type=text class=equal
alt={params:'some_value', require: 'pre-condition', condition:
Hi
take a look
http://dnaide.blogspot.com/2007/05/validationaide-easy-as-client-side-form.html
BrowserSide validation. Very good.
Regards
Mario
2007/8/17, SeViR [EMAIL PROTECTED]:
I suppose that you need a custom rule due to validation plugin don't
support relations
between fields.
20 matches
Mail list logo