Re: [jQuery] Validation and AJAX forms

2010-03-23 Thread Steffan A. Cline
I've still not gone anywhere with this. Any suggestions? Thanks Steffan > From: Steffan Cline > Reply-To: > Date: Mon, 22 Mar 2010 22:54:32 -0700 > To: "jquery-en@googlegroups.com" > Subject: [jQuery] Validation and AJAX forms > > I'm tinkering with the jquery forms plugin with the valid

Re: [jQuery] Validation plugin

2010-01-18 Thread Nathan Klatt
On Mon, Jan 18, 2010 at 4:55 AM, perkin5 wrote: > http://www.richardbarnfather.co.uk/esu/php/booking_mike.php > > All fields have a class of 'required' and the email field has The fields that aren't validating have typos in the class setting - they're missing the equals sign: class"required" inst

[jQuery] Re: Jquery validation remote problem

2010-01-08 Thread Jeffrey
I figured something out.. in de js file of the validator is the next section: formatAndAdd: function( element, rule ) { var message = this.defaultMessage( element, rule.method ), theregex = /\$?\{(\d+)\}/g; if ( typeo

Re: [jQuery] (validation): remote rule causes submit to abort, fix included

2009-12-30 Thread amschroeder
I ran into the same problem as Ken. Calling $("#form").validate().form() would yield true, even when the remote validation should have been failing. The problem is... (1) When calling .validate.form() -- it returns prematurely with the status of "pending" for all remote validation rules. (2)

Re: [jQuery] (validation): remote rule causes submit to abort, fix included

2009-12-21 Thread Andre Polykanine
Hello KenGreer and all, Hm, it seems that I have the same problem. My solution is even less elegant: I place the focus into the first field of the form, so the user can't proceed without moving the focus out. And if he/she moves it out, the valid

Re: [jQuery] (validation): remote rule causes submit to abort, fix included

2009-12-21 Thread Jörn Zaefferer
The plugin will submit the form after the async request finishes. The remaining problem is that any submit-button won't be submitted. Maybe thats the problem you had? Jörn On Mon, Dec 21, 2009 at 8:15 AM, KenGreer wrote: > With the validation plugin (http://bassistance.de/jquery-plugins/ > jque

[jQuery] Re: jQuery Validation Plugin messages by field rule.

2009-12-21 Thread Antti
Didnt i try that... :P. Thanks a lot for soulution and quick response!! That did a exactly what i wanted. On 19 joulu, 22:25, Andre Polykanine wrote: > Hello Antti and all, > >           You just don't need to nestmessages, they should be >           overwritten: > >                         input

Re: [jQuery] Validation Plugin:need help with errorPlacement

2009-12-15 Thread Gian-ava
Oh, for posterity, in case anybody else find this useful, here is the complete code that worked fine for me. $(document).ready(function(){ $('#actionform').validate({ errorPlacement: function(error, element) { $(element).closest('.rowElem'

Re: [jQuery] Validation Plugin:need help with errorPlacement

2009-12-15 Thread Gian-ava
Leonardo, today you're my man! It finally worked! THAT was what I was looking for. I can't tell you how long I've been trying to achieve just that result, so you can't imagine how much I appreciate your help. Really, thanks! I actaully had found a workaround to place the error mesage with just

Re: [jQuery] Validation plugin: required by condition

2009-12-15 Thread Leonardo K
Something like this: $(form).validate({ rules:{ announce: { required: function(element) { var value = $("input[name='blog-entry']").val(); if ( val == 'publication' || val == 'post' ){ return true; }e

Re: [jQuery] Validation Plugin:need help with errorPlacement

2009-12-15 Thread Leonardo K
Every input element is wrapped in a div with class 'rowElem'? So your errorPlacement should be something like this: errorPlacement: function(error, element) { $(element).closest('.rowElem').after(error); //the method closest get the closest parent with class rowElem }, On Mon, Dec 14, 2

Re: [jQuery] Validation Plugin:need help with errorPlacement

2009-12-14 Thread Gian-ava
Leonardo, I see. Firebug' error console says: Error: missing ) after argument list Line: 8, Column: 12 Source Code: } Strange, since I don't think this is correct. Also, it says: Error: syntax error Line: 7, Column: 30 Source Code: errorPlacement: function(error, element) {

Re: [jQuery] Validation Plugin:need help with errorPlacement

2009-12-14 Thread Leonardo K
The debug:true only work with firebug (extension for firefox). The messages will appear in console On Mon, Dec 14, 2009 at 11:50, Gian-ava wrote: > > Leonardo, thanks for your interest in my case. > > I've tried out the code with the debug option. I just don't know what the > debug function will

Re: [jQuery] Validation Plugin:need help with errorPlacement

2009-12-14 Thread Gian-ava
Leonardo, thanks for your interest in my case. I've tried out the code with the debug option. I just don't know what the debug function will generate and where I need to look to see the result. Otherwise, again, your code doesn't get validation to work. This one do work: $(document).ready(func

Re: [jQuery] validation plugin. errorplacement and onblur

2009-12-14 Thread Leonardo K
You can use the errorLabelContainer to put all your label in a div, and the plugin will handle this. errorLabelContainer: "#messageBox", On Sun, Dec 13, 2009 at 09:33, Droy wrote: > Greetings! I had a small problem: all errors received in plugin > validation I take out in div the block with id

Re: [jQuery] Validation Plugin:need help with errorPlacement

2009-12-14 Thread Leonardo K
Try to use the debug:true option to find what's going on. Check if the form has the id=actionform. $('#actionform').validate({ debug:true, submitHandler: function(form) { $(form).ajaxSubmit({ success: function() { $('#actionform').hide();

Re: [jQuery] Validation Plugin:need help with errorPlacement

2009-12-13 Thread Gian-ava
Hi Leonardo, Thanks for answering. Unfortunately, the validation doesn't work at all with the code you provided: the form is sent even if the required fields are empty. Any hint? Leonardo K wrote: > > This should work: > > $(document).ready(function(){ >$('#actionform').validate({ >

Re: [jQuery] Validation Plugin:need help with errorPlacement

2009-12-13 Thread Leonardo K
This should work: $(document).ready(function(){ $('#actionform').validate({ submitHandler: function(form) { $(form).ajaxSubmit({ success: function() { $('#actionform').hide(); $('#content').append("Thanks! Yo

Re: [jQuery] Validation Plugin:need help with errorPlacement

2009-12-13 Thread Gian-ava
Oh c'mon, nobody who can helo me out with this? Nobody who can figure out how to code the right errorPlacement to place the error label where I need it? -- View this message in context: http://old.nabble.com/Validation-Plugin%3Aneed-help-with-errorPlacement-tp26719238s27240p26769256.html Sent f

Re: [jQuery] [Validation]

2009-12-10 Thread Jörn Zaefferer
The plugin in use there is http://bassistance.de/jquery-plugins/jquery-plugin-validation/ You already had the link to the plugin's documentation. The Marketo-Demo is included in the Download, with all CSS and JS files. I recommend you look at those, and come back here with more specific questions.

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 wo

Re: [jQuery] Validation error placement

2009-11-18 Thread Atkinson, Sarah
Ok so I switched to errorLabelContainer: ".insidePage_error", But that div still isn't getting any errors into it. On 11/18/09 1:55 PM, "Jörn Zaefferer" wrote: Do you have only a single element? Then use the errorLabelContainer option. Or one for each input? Then you need to make that sel

Re: [jQuery] Validation error placement

2009-11-18 Thread Atkinson, Sarah
Yes I have only one container Ok so I will use the errorLabelContainer Now after I do that can I use the offset to alter the css on each of the error labels to be equal to the offset of the offending element? Or should a create custom method that runs after validation runs repositions everythin

Re: [jQuery] Validation error placement

2009-11-18 Thread Jörn Zaefferer
Do you have only a single element? Then use the errorLabelContainer option. Or one for each input? Then you need to make that selector relative to the current input; currently you select the same div for each input. Jörn On Wed, Nov 18, 2009 at 7:29 PM, Atkinson, Sarah < sarah.atkin...@cookmedica

Re: [jQuery] Validation error placement

2009-11-18 Thread Atkinson, Sarah
That's actualy what I was looking at... But I'm not using a table layout. So instead I want them to go into a special error div with class "insidePage_error" And so I got these 2 lines errordiv=$('.insidePage_error div'); error.appendTo(errordiv); I also tried Errordiv.appendChild(err

Re: [jQuery] Validation error placement

2009-11-18 Thread Jörn Zaefferer
Take a look at the milk-demo here: http://jquery.bassistance.de/validate/demo/milk The messages are placed in the column next to the input element, that should be close to what you are looking for. Jörn 2009/11/18 Atkinson, Sarah > I am trying to put all my errors in a that is the 3rd column.

Re: [jQuery] Validation and dropdowns

2009-11-17 Thread Jörn Zaefferer
Set the field as required and provide value="" on the default option: Please... Jörn On Tue, Nov 17, 2009 at 7:57 PM, Atkinson, Sarah < sarah.atkin...@cookmedical.com> wrote: > I have several dropdowns in my form. They start on a “please select one” > state. How do I make it so that if one

Re: [jQuery] Validation (groups, rules and messages)

2009-11-17 Thread Jörn Zaefferer
It affects the message display, producing only a single error label for a given group. Jörn On Tue, Nov 17, 2009 at 4:35 PM, Atkinson, Sarah < sarah.atkin...@cookmedical.com> wrote: > > So what exactly does the group option do? > > > > On 11/17/09 10:30 AM, "Jörn Zaefferer" > wrote: > > You nee

Re: [jQuery] Validation (groups, rules and messages)

2009-11-17 Thread Atkinson, Sarah
So what exactly does the group option do? On 11/17/09 10:30 AM, "Jörn Zaefferer" wrote: You need to specify the rules for each individual field, here firstname and lastName. The group name doesn't have any meaning outside the groups-option itself. Jörn On Tue, Nov 17, 2009 at 4:23 PM, Atki

Re: [jQuery] Validation (groups, rules and messages)

2009-11-17 Thread Jörn Zaefferer
You need to specify the rules for each individual field, here firstname and lastName. The group name doesn't have any meaning outside the groups-option itself. Jörn On Tue, Nov 17, 2009 at 4:23 PM, Atkinson, Sarah < sarah.atkin...@cookmedical.com> wrote: > I’m working with the validation plugin

Re: [jQuery] Validation

2009-11-16 Thread Leonardo K
You dont need to submit again inside the submitHandler function. $("form#send_gb").validate({ submitHandler: function(form) { var gb_post = $("#gb_post").attr("value"); var userid = $("#userid").attr("value"); var ownerid = $("#ownerid").attr("value"); $.ajax({

Re: [jQuery] Validation Plugin + jNice

2009-11-13 Thread Jörn Zaefferer
Do you have a testpage? Jörn On Fri, Nov 13, 2009 at 4:40 PM, Samuurai wrote: > I'm having a strange problem with jNice and the validation plugin. > > Probably the easiest way to describe the error is by giving an > example. > > I load the page with my form on it, then without typing anything,

Re: [jQuery] (validation) Validation plugin submitHandler

2009-11-12 Thread Jörn Zaefferer
Use a different name for the submit-button. Using name="submit" you override the actual submit-function of the form. Keep in mind that in the DOM API, you can access any form element as a property of the form, referenced by name. Jörn On Thu, Nov 12, 2009 at 8:48 PM, mcrawford wrote: > I'm tota

[jQuery] Re: jQuery validation and error messages

2009-10-21 Thread Bi Jing
Its depending on your requirement, normally it should on onblur event. On Thu, Oct 22, 2009 at 10:27 AM, talasan.nichol...@gmail.com < talasan.nichol...@gmail.com> wrote: > > Is this on submit or live? I don't see how I'd use that. > > On Oct 20, 10:41 pm, Bi Jing wrote: > > You can set id attri

[jQuery] Re: jQuery validation and error messages

2009-10-21 Thread talasan.nichol...@gmail.com
Err. This was directed towards the if and else JS. I'm already using the jQuery validator; and I've been through the docs and can't find anything that would really do what I want it to. The label will change, but I also need another element to change [the fields description] So the example woul

[jQuery] Re: jQuery validation and error messages

2009-10-21 Thread talasan.nichol...@gmail.com
Is this on submit or live? I don't see how I'd use that. On Oct 20, 10:41 pm, Bi Jing wrote: > You can set id attribute of element, e.g. username_desc > And then using following script, > if(success){ > $("#username_desc").html('default msg');}else{ > > $("#username_desc").html('error msg'); >

[jQuery] Re: jQuery Validation - ajax check for email

2009-10-21 Thread Samuurai
Fantastic!!! I got it working.. my first ever ajax request.. :P Thanks Jorn for this great plugin. For other readers, have your remote script return "true" or "false" - no need for JSON. Here's my working code. rules:{ email: { required: true, email: true

[jQuery] Re: jQuery Validation - ajax check for email

2009-10-21 Thread Jörn Zaefferer
The method has to return something else then undefined. You can use the remote-method instead, it allows you to do remote checks: http://docs.jquery.com/Plugins/Validation/Methods/remote Jörn On Wed, Oct 21, 2009 at 2:12 PM, Samuurai wrote: > > Hi, > > This is my first attempt at using addMetho

[jQuery] Re: jQuery validation and error messages

2009-10-21 Thread jonem
This works for me. http://bassistance.de/jquery-plugins/jquery-plugin-validation/ Vary simple if you take the time to read docs. /jon On Oct 21, 5:41 am, Bi Jing wrote: > You can set id attribute of element, e.g. username_desc > And then using following script, > if(success){ > $("#username_d

[jQuery] Re: jQuery validation and error messages

2009-10-20 Thread Bi Jing
You can set id attribute of element, e.g. username_desc And then using following script, if(success){ $("#username_desc").html('default msg'); }else{ $("#username_desc").html('error msg'); } Or you can add a new used to show error message, toggle it between default on your validation result. B

[jQuery] Re: jquery validation using thickbox

2009-10-19 Thread Mattycrocks
I've encountered a similar problem with something I'm doing. Current project is using asp.net 2 webforms which is a pain but that's the boundaries of this project. Context: I have a Gridview which is databound with some html buttons and then these buttons are wired up in jquery so that when cli

[jQuery] Re: jquery validation using thickbox

2009-10-19 Thread Phill Pafford
Try this link: http://stackoverflow.com/questions/786332/jquery-validation-not-working-in-thickbox-display-ajax-call Also you could just post the question on StackOverFlow.com There are lots of jQuery experts to help and the response time is awsome. --Phill Mattycrocks wrote: > > I've encoun

[jQuery] Re: jQuery Validation Submitting without Validation in Firefox (validate)

2009-09-01 Thread Jörn Zaefferer
You've got a script error on submit. Set debug:true to stop the submit and look at the error. Jörn On Tue, Sep 1, 2009 at 3:45 PM, jake.d.hol...@googlemail.com wrote: > > Hi Guys, > > I've put together a pretty simple competition script - it's commented > out below and you can find the demo at

[jQuery] Re: Jquery Validation plugin doesn't working on ASP NET MVC

2009-08-27 Thread Anoop kumar V
You need to reverse the order of sourcing the javascript files. Put the jquery 1.3.2.js file before the validate.js. -Anoop On 8/27/09, Edgar Méndez. wrote: > > I'm trying to use the Jquery Validation plugin on aspnet mvc > fframework but it doesn't work, when I open the firebug console it > di

[jQuery] Re: jQuery validation - Numbers not allowed

2009-08-10 Thread Eduardo Pinzon
try create this method jQuery.validator.addMethod("notNumber", function(value, element, param) { var reg = /[0-9]/; if(reg.test(value)){ return false; }else{ return true

[jQuery] Re: jQuery validation custom method doesn't work

2009-07-23 Thread Erwin Purnomo
wow thanks it really worked now the element param is kind of useless right? i wonder why it doesn't work :) anyway huge thanks to Jules On Jul 23, 12:05 pm, Jules wrote: > Your code should have been: > >      $.validator.addMethod('myEqual', function (value, element, param) > { >          retu

[jQuery] Re: jQuery validation custom method doesn't work

2009-07-22 Thread Jules
Your code should have been: $.validator.addMethod('myEqual', function (value, element, param) { return value >= $(param).val(); // this works know }, 'Please enter a greater year!'); On Jul 23, 12:21 pm, Erwin Purnomo wrote: > Hello all > > I have added a method on jQuery

[jQuery] Re: Jquery Validation How To

2009-07-22 Thread Jules
The validation is only triggered during submit event which is fine to me. I don't like interactive validation as it creates distraction to the users. $("form").validate( { errorLabelContainer: "#errMsg", wrapper: "li" });

[jQuery] Re: jQuery Validation - group input field validation

2009-07-14 Thread carbon
Just before the , theres the DIV that contains the error messages. There are errors in your enquiry submission, please see below for details. Please enter your first name Please enter your last name Please provide either an email address, home phone or mobile for us to get in

[jQuery] Re: jquery validation plugin. Need help with passing variable to jQuery.format

2009-06-05 Thread talisien
On 5 jun, 12:11, talisien wrote: > I'm having some troubles with passing variables to jQuery.format > > I have a script (php) that's checks if the domain part exists. If not > it will show an message > > The following code works #1 > > It split an email address and assigns the domain name to th

[jQuery] Re: jQuery Validation Plugin

2009-05-26 Thread Rams j
Hi Bob, Its working fine.. http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1999/xhtml"; > Untitled Page $(document).ready(function() { $('#new_blog_post').validate({ rules: { "blog_post[title]": "required",

[jQuery] Re: jQuery Validation Plugin

2009-05-26 Thread Jörn Zaefferer
A testpage would help. Can't see anything wrong with that code. Jörn On Tue, May 26, 2009 at 4:13 PM, Bob O wrote: > > So it seems im still having some issues.. > > this is my html > > > > Title > > > > > Body > > cols="28"/> > > > Author > > > > > Permalink > A hyphen separated t

[jQuery] Re: jQuery Validation Plugin

2009-05-26 Thread Bob O
So it seems im still having some issues.. this is my html Title Body Author Permalink A hyphen separated title for URL's e.g. my- title and this is my js placed after the jQuery and jquery.validate scripts. $(document).ready(function() { $('#new_blog_post').validate({

[jQuery] Re: jQuery Validation Plugin

2009-05-26 Thread Bob O
Man i combed the docs for a day, and i missed that link everytime.. Thanks Jorn. On May 23, 3:02 pm, Jörn Zaefferer wrote: > You need to quote the full key, eg "name['name']": "required". > Seehttp://docs.jquery.com/Plugins/Validation#Fields_with_complex_names_ > > Jörn > > On Fri, May 22,

[jQuery] Re: jQuery Validation Plugin

2009-05-23 Thread Jörn Zaefferer
You need to quote the full key, eg "name['name']": "required". See http://docs.jquery.com/Plugins/Validation#Fields_with_complex_names_.28brackets.2C_dots.29 Jörn On Fri, May 22, 2009 at 10:15 PM, Bob O wrote: > > so as not to confuse.. > > the name attribute looks like this > name="name['name'

[jQuery] Re: jQuery Validation Plugin

2009-05-22 Thread Bob O
so as not to confuse.. the name attribute looks like this name="name['name']" for the input field and the js is rules: { name['name']: 'required' } i noticed typos in the above question. On May 22, 12:36 pm, "bhan...@hcinsight.com" wrote: > Can anyone tell me how i can change which attri

[jQuery] Re: JQuery Validation plugin with Django (New) Forms (V1.0) - Are these compatible?

2009-05-06 Thread BrendanC
Jorn - thanks for the responses - I resolved my problem - for the record I had a mismatch between the versions of JQuery (1.3.2) and an earlier (incompatible) version of the plugin. This was causing some errors that I managed to track down with Firebug. Downloaded the new version of the validatio

[jQuery] Re: JQuery Validation plugin with Django (New) Forms (V1.0) - Are these compatible?

2009-05-06 Thread Jörn Zaefferer
You can set debug:true for debugging. It will always prevent the form submit, which is useful to look at errors that are thrown during validation. Jörn On Wed, May 6, 2009 at 8:37 PM, BrendanC wrote: > > Jon - Good catch - however that was just a cut/paste problem - below > is a new example tha

[jQuery] Re: JQuery Validation plugin with Django (New) Forms (V1.0) - Are these compatible?

2009-05-06 Thread BrendanC
Jon - Good catch - however that was just a cut/paste problem - below is a new example that does not work as expected - for some reason the validation errors are ignored and the form is posted - not what I was expecting. Is there something else I need to do to prevent form from posting on errors? W

[jQuery] Re: JQuery Validation plugin with Django (New) Forms (V1.0) - Are these compatible?

2009-05-05 Thread Jörn Zaefferer
You define rules for a field "sender", but there is no input with name="sender". Jörn On Tue, May 5, 2009 at 7:28 PM, BrendanC wrote: > > JQuery newbie question re using validation plugin with Django newform. > I have a simple email feedback contact django form that I wanted to > enhance with s

[jQuery] Re: jquery & validation in cakephp

2009-05-05 Thread ZedR
Ok I got it done. It works. The problem was in my jquery code. On May 4, 10:56 pm, ZedR wrote: > I am validating form fields on blur event injquery. How do I validate > more than 1 field in the controller action called from ajax with > $params['form']. Code I m trying is: > > //ajax action in co

[jQuery] Re: jquery validation using thickbox

2009-04-24 Thread Phill Pafford
Did you ever find a solution? I'm facing the same problem. Thanks, --Phill bookme wrote: > > > Hi, > > Sorry to bother you but I am not able to solve this problem so posting > in forum > > I am using two jquery plugin > 1 Thickbox > 2 Jquery validation > > Without thickbox validation is

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

2009-04-23 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 = val

[jQuery] Re: jQuery Validation Plugin - rule metadata documentation?

2009-04-23 Thread Jörn Zaefferer
This requires the metadata plugin: class="{required:true,vinUS:true}" This doesn't: class="required vinUS" minlength="2" Jörn On Thu, Apr 23, 2009 at 10:09 PM, Brad wrote: > > Thanks Jorn. Since I wrote I've been looking at the additional- > methods.js to get ideas on how to write some custom

[jQuery] Re: jQuery Validation Plugin - rule metadata documentation?

2009-04-23 Thread Brad
Thanks Jorn. Since I wrote I've been looking at the additional- methods.js to get ideas on how to write some custom filter and found this example: class="{required:true,vinUS:true}" Is that object syntax required when using custom filters as opposed to simply class="required vinUS"? re: "where

[jQuery] Re: jQuery Validation Plugin - rule metadata documentation?

2009-04-23 Thread Jörn Zaefferer
The list applies to metadata as well. You can specify any method as an attribute, and where there are no parameters needed, use a class instead. Jörn On Thu, Apr 23, 2009 at 9:49 PM, Brad wrote: > > Are the options, usage and limitations for the jQuery Validation rules > using metadata in marku

[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 pre

[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 pre

[jQuery] Re: Jquery validation plugin question

2009-03-27 Thread markstegg...@googlemail.com
Thanks. It gives me an error saying "element.attr is not a function" What is wrong with this: highlight: function(element, errorClass) { if (element.attr("name") == "aupairLanguageList") $("#multiSelect-aupairLanguageList-title").addClass("error"); }, unhighlight: function(elem

[jQuery] Re: Jquery validation plugin question

2009-03-26 Thread Jörn Zaefferer
Use the highlight and unhighlight options for that. Jörn On Thu, Mar 26, 2009 at 3:21 PM, markstegg...@googlemail.com wrote: > > Hello, > > Thanks for building this validation plugin, I like it. I have a > question: > > The error class automatically gets added to the label with the same > for="

[jQuery] Re: jQuery Validation Plugin & ASP.NET

2009-03-24 Thread Mac
Hi You are not placing the # in front of the form id as jquery requires. I do that all the time!!! On Mar 24, 12:26 pm, Zach wrote: > I've tried to get this to work for the past 4 hours and I'm stuck. > > I've got a master page with the following scripts added. > >     >     > > this is the f

[jQuery] Re: jQuery validation and captcha

2009-03-24 Thread Jörn Zaefferer
Custom method must return a result instantly, and don't support callbacks as required for Ajax calls. For that, use the remote method: http://docs.jquery.com/Plugins/Validation/Methods/remote#url Jörn On Tue, Mar 24, 2009 at 3:26 PM, Mr J wrote: > > dear all, > > i'm working with jQuery validati

[jQuery] Re: jQuery Validation Plugin & ASP.NET

2009-03-24 Thread jdobs...@gmail.com
Zach, Try adding rules via the Validate method like so: $(document).ready(function() { $("#aspnetForm").validate({ rules: { TitleField: { minlength: 2 } } }); }); This worked f

[jQuery] Re: jQuery validation plugin -- how to validate an input only if it contains info

2009-03-11 Thread clorentzen
Thank you! --Carl. On Mar 11, 7:54 am, Jörn Zaefferer wrote: > add if (this.optional(element)) return true; to the top. See any > existing validation method for an example, > orhttp://docs.jquery.com/Plugins/Validation/Validator/addMethod > > Jörn > > On Wed, Mar 11, 2009 at 12:43 PM, clorentz

[jQuery] Re: jQuery validation plugin -- how to validate an input only if it contains info

2009-03-11 Thread Jörn Zaefferer
add if (this.optional(element)) return true; to the top. See any existing validation method for an example, or http://docs.jquery.com/Plugins/Validation/Validator/addMethod Jörn On Wed, Mar 11, 2009 at 12:43 PM, clorentzen wrote: > > Hi -- > > I've got a contact form here > > http://www.dianlof

[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 emp

[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 like:

[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 (this.optional(ele

[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 emai

[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-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?) return

[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 wrote: > Hi > > is this just a copy & paste error, or a real syntax error? You have to > quote the comma in your split command: >   var ema

[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 : > > So far, I have adapted this: > > email: function(value, element) { >return this.opti

[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 w

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

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

[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 wrote: > So far, I have adapted this: > > email: function(value, elemen

[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-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 tha

[jQuery] Re: jQuery + Validation: submit() is sending multiple form submits

2009-02-08 Thread zubin
Hey Jörn thanks for the reply, good to know! I went with James solution which is perfect for what i'm working with. Thanks again guys. On Feb 9, 9:07 am, James wrote: > Since you wanted do submit by Ajax; > > $("#form-external-link").validate({ >        rules: { >                exlink_url: { >

[jQuery] Re: jQuery + Validation: submit() is sending multiple form submits

2009-02-08 Thread James
Since you wanted do submit by Ajax; $("#form-external-link").validate({ rules: { exlink_url: { required: true, url: true } }, submitHandler: function(form) { $.ajax(...); } });

[jQuery] Re: jQuery + Validation: submit() is sending multiple form submits

2009-02-08 Thread Jörn Zaefferer
Try this: $("#form-external-link").validate({ rules: { exlink_url: { required: true, url: true } }, submitHandler: function(form) { alert('This will pop up only once as it should');

[jQuery] Re: jQuery + Validation: submit() is sending multiple form submits

2009-02-08 Thread zubin
Hi James! Thanks for the quick reply. I'm still confused as to where I should place my $(form).submit(..). so i'm not re-attaching additional submit events? What i'm doing basically is: 1. have Validate pass the form 2. submit the form via ajax The only thing is that the form is always being reus

[jQuery] Re: jQuery + Validation: submit() is sending multiple form submits

2009-02-08 Thread James
Hmm.. code didn't display properly. I wanted to say, every time you're doing $(form).submit(...) you're re-attaching an additional submit... On Feb 8, 9:13 am, James wrote: > Every time you're doing: > > you're re-attaching an additional submit event to the form, so it's > executing it multipl

[jQuery] Re: jQuery + Validation: submit() is sending multiple form submits

2009-02-08 Thread James
Every time you're doing: you're re-attaching an additional submit event to the form, so it's executing it multiple times every time you submit. What is it you're trying to do? When you define submitHandler for validate, you should be doing whatever you're doing in $(form).submit () inside the sub

[jQuery] Re: jquery validation on non java complaint browser

2009-02-03 Thread david.0pl...@gmail.com
I was just using "java" as a nickname for "javascript" Anyway thank you, it's what I suspected, at least now I'm sure! Thanks On Feb 3, 11:57 am, Jörn Zaefferer wrote: > First of all, it's JavaScript, not Java. Second, you always need > serverside validation - anything on the clientside can be

[jQuery] Re: jquery validation on non java complaint browser

2009-02-03 Thread Jörn Zaefferer
First of all, it's JavaScript, not Java. Second, you always need serverside validation - anything on the clientside can be disabled. An attacker wouldn't even have to use a browser to submit the form. In other words: Implement both. Serverside for security and data integrity, clientside for a bet

[jQuery] Re: JQuery Validation - call validate(options) multiple times to append options to current validator [validate]

2009-01-12 Thread Jörn Zaefferer
Give this a try: var validator = $("#myform").validate(options); $.extend(validator.settings, moreOptions); Also take a look at the rules method: http://docs.jquery.com/Plugins/Validation/rules Jörn On Mon, Jan 12, 2009 at 10:49 PM, phil wrote: > > Just Pinging this thread to see if anyone has

[jQuery] Re: JQuery Validation - call validate(options) multiple times to append options to current validator [validate]

2009-01-12 Thread phil
Just Pinging this thread to see if anyone has a solution or workaround... On Jan 11, 8:06 pm, phil wrote: > I'm wondering if it's possible to call the validate method multiple > times toappendmoreoptionsto thevalidator. > I haven't tried it, but it seems like it will overwrite previousoptions. >

[jQuery] Re: jquery validation plugin and hidden elements

2008-12-30 Thread MorningZ
It appears that you are confusing "display: none" with "type="hidden" they are two totally different controls if you have and you set it to "display: none" when the checkbox is checked... for instance, saying $("#Name1").hide() then the selector [...@type=hidden] won't find that because

[jQuery] Re: jquery validation

2008-12-19 Thread sad1sm0
if you are trying to assign an id to an element that's already part of the dom you need to be sure that you use a selector that is specific to only that element and add the id attribute with .attr ('id','error'). As far as showing and hiding passwords, you should just be able to change the type a

  1   2   >