[jQuery] Validation Question

2009-11-24 Thread Dave Maharaj :: WidePixels.com
I submit my form , check valid, valid then away it goes. I was wondering 1 thing. I have $(this).validate(validate_awards); var valid = $(this).valid(); if (valid) { do my stuff } Now I have validate_awards which contains my rules for validation var validate_awards = {

Re: [jQuery] Validation Question

2009-11-24 Thread Jörn Zaefferer
Only fields present in the form are validated. Rules not matching any element are ignored, so yes, you can just merge those. Jörn On Wed, Nov 25, 2009 at 12:24 AM, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: I submit my form , check valid, valid then away it goes. I was

[jQuery] Validation question

2009-08-31 Thread Dave Maharaj :: WidePixels.com
I have this script $(document).ready( function() { $('#username').blur( function () { fieldName = $(this).attr('id'); fieldValue = $(this).val(); $.post('/users/ajax_validate', { field: fieldName,

[jQuery] Re: jQuery validation question: validating multiple email inputs

2009-04-24 Thread ml2009
Hi Roryreiff - thank you so much. Someone helped me out the other day. Here is another version: multiemail: function(value, element) { if (this.optional(element)) // return true on optional element return true; var emails =

[jQuery] Re: jQuery validation question: validating multiple email inputs

2009-04-01 Thread roryreiff
ml2009, I seem to have it working within the confines of validating multiple email addresses within the plugin's reg exp. I made the validation check run only if the email length is greater than one...this takes care of the case when a user has a comma after the last email address (i.e., this

[jQuery] Re: jQuery validation question: validating multiple email inputs

2009-04-01 Thread roryreiff
ml2009, I seem to have it working within the confines of validating multiple email addresses within the plugin's reg exp. I made the validation check run only if the email length is greater than one...this takes care of the case when a user has a comma after the last email address (i.e., this

[jQuery] Re: jQuery validation question: validating multiple email inputs

2009-03-02 Thread ml2009
Hi Stephan - thank you so much for your response. I keep trying, but being unsuccessful. I tried valid = valid , (valid=valid) , and (valid == valid) , but I get a syntax error reference in Firebug. I even tried declaring var valid = (value.length 0); // make sure that value is not empty

[jQuery] Re: jQuery validation question: validating multiple email inputs

2009-03-01 Thread ml2009
Hello - wonder if you could help me. I tried another way to validate multiple email addresses, but I still couldn't figure it out. on code below, only the first email is validated. Any suggestions? jQuery.validator.addMethod(multiemail, function(value, element, param) { if

[jQuery] Re: jQuery validation question: validating multiple email inputs

2009-03-01 Thread Stephan Veigl
Hi, you have the same error as above. Having a return statement in a for loop will evaluate the first element only. If you want to validate all emails that's a logical AND conjunction of all single email validations. So you have to have some and function in your code as well. Try something

[jQuery] Re: jQuery validation question: validating multiple email inputs

2009-02-28 Thread ml2009
trying to do the same type of validation, but it didn't work for me. could you please help? multiemail: function(value, element) { if (this.optional(element)) // return true on optional element return true; var emails = value.split(','); var valid = (value.length

[jQuery] Re: jQuery validation question: validating multiple email inputs

2009-02-28 Thread ml2009
trying to do the same type of validation, but it didn't work for me. Could you please help? multiemail: function(value, element) { if (this.optional(element)) // return true on optional element return true; var

[jQuery] jquery validation question: validate a single form element onsubmit

2009-02-28 Thread Eben Goodman
I'm using the validate plugin, and am having a problem with simple one element forms. I have a single select list and a submit button. If the select list is empty, the validation prompts that it is required. When you choose an option, and click Submit, it validates and removes the required

[jQuery] Re: jQuery validation question: validating multiple email inputs

2009-02-18 Thread Stephan Veigl
Hi, Taking a second look on your code it's clear why only the first email address is validated: you have a return statement in your for loop. try something like: email: function(value, element) { if (this.optional(element)) // return true on optional element (whatever this is for?)

[jQuery] Re: jQuery validation question: validating multiple email inputs

2009-02-17 Thread roryreiff
Rob, By not working I mean that it now will not return an error message when the first input is a well formed email. So, I could put in the following (correctly formed email, incorrectly formed email + and number of items) and it is validating that field, i.e. not producing the error message. I

[jQuery] Re: jQuery validation question: validating multiple email inputs

2009-02-17 Thread Stephan Veigl
Hi is this just a copy paste error, or a real syntax error? You have to quote the comma in your split command: var emails = value.split(,); by(e) Stephan 2009/2/17 roryreiff roryre...@gmail.com: So far, I have adapted this: email: function(value, element) {

[jQuery] Re: jQuery validation question: validating multiple email inputs

2009-02-17 Thread roryreiff
Yeah, I actually have that fixed in the posted link, but thanks for pointing that out. So, something else is at error now. On Feb 17, 9:04 am, Stephan Veigl stephan.ve...@gmail.com wrote: Hi is this just a copy paste error, or a real syntax error? You have to quote the comma in your split

[jQuery] Re: jQuery validation question: validating multiple email inputs

2009-02-16 Thread roryreiff
So far, I have adapted this: email: function(value, element) { return this.optional(element) || /^((([a-z]|\d|[!#\$%'\*\+\-\/=\? \^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\ $%'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)

[jQuery] Re: jQuery validation question: validating multiple email inputs

2009-02-16 Thread roryreiff
Allow me to show you what I have so far. It seems to validate base on the first email, but none of the successive ones, in regards to the to field: http://www.pomona.edu/asp/mailthis-redux.asp On Feb 16, 4:53 pm, roryreiff roryre...@gmail.com wrote: So far, I have adapted this: email:

[jQuery] Re: jQuery validation question: validating multiple email inputs

2009-02-16 Thread RobG
On Feb 17, 10:53 am, roryreiff roryre...@gmail.com wrote: So far, I have adapted this: [...] into this: email: function(value, element) { var emails = value.split(,); for(var emailAddress in emails) {

[jQuery] [validate] jQuery validation question: validating multiple email inputs

2009-02-13 Thread roryreiff
Hi there, I am using the Validation plugin to validate a form that emails the current pages URL to the recipients entered in to the email to field. I want to validate that field for multiple emails addressed separated by commas...and ideas on how to do this? I'm a bit new to jQuery so I am a

[jQuery] Re: jQuery validation question: validating multiple email inputs

2009-02-13 Thread Ed Lerner
I'm new to jQuery as well. In other languages, you would take the string that holds all of the emails and do a 'split' on commas. This should give you an array where each element is an individual email. From there, just validate each element. How to do this in jQuery, someone more experienced

[jQuery] jQuery Validation Question on remote rule

2008-07-25 Thread Nimrod
Hi All, I just have few questions about the use of jQuery Validation remote rule. How remote rule treat data being passed through querystring? What is the form of data being passed through querystring? Is it case sensitive? I hope you can give me answers to those questions. Thanks, Nimrod

[jQuery] Re: jQuery Validation Question on remote rule

2008-07-25 Thread Jörn Zaefferer
Maybe an example helps to explain, as I'm not sure I understand your question. form id=myform input class=required remote=/unique-username name=firstname value=Pete / /form $(#myform).validate(); Request being sent to server for remote validaiton: GET /unique-username?firstname=Pete The

[jQuery] Re: jQuery Validation Question - remote Rule

2008-07-21 Thread Joel Newkirk
That should work, though you should probably use something like encodeURIComponent($('#AssignedTo').val()) to ensure legal characters. You probably could have just tried it and found out faster than posting here... ;) j On Mon, Jul 21, 2008 at 9:52 AM, Nimrod [EMAIL PROTECTED] wrote: Hi