Thank you. Any suggestions where to assign a class other than error for showErrors?
Im new to jquery and really appreciate it! This is (obviously) showErrors as it looks unmodified... showErrors: function(errors) { if(errors) { // add items to error list and map $.extend( this.errorMap, errors ); this.errorList = []; for ( var name in errors ) { this.errorList.push({ message: errors[name], element: this.findByName(name)[0] }); } // remove items from success list this.successList = $.grep( this.successList, function(element) { return !(element.name in errors); }); } this.settings.showErrors ? this.settings.showErrors.call( this, this.errorMap, this.errorList ) : this.defaultShowErrors(); }, On 2 Apr, 19:45, Jörn Zaefferer <joern.zaeffe...@googlemail.com> wrote: > None of these is trivial to implement, but not impossible either. > > 3. needs a custom method, look at the existing methods and addMethod > for reference:http://docs.jquery.com/Plugins/Validation/Validator/addMethod > > 2. could be achieved using showErrors, though you'd need to replicate > some of the default functionality > > 1. sounds like it would be covered by 2. already > > Jörn > > On Wed, Apr 1, 2009 at 7:32 PM, jo...@retype.se <jo...@retype.se> wrote: > > > Hello. > > > I just started implementing the jquery Validate-plugin on a site i'm > > working on. > > > I'm new to jQuery and have not been deeply interested in javascript > > earlier. > > > However, everything works fine. Thanks! > > > I have a few problems though, that i need som help on how to fix. > > > 1. Im using sucess: "valid" to print a label with the class valid when > > somethings entered correct. Is it possible without to much pain to > > pass on a message to the valid-label? Like "Thats right!". Either one > > globally or even better one for each input. > > > 2. Is there possible to have a (again without to much work) label > > there from the start, with a separate class containing a hint about > > the input box? Which then switches to .error or .valid when the user > > starts to type in the input? > > > 3. And a last one, is there possible to validate digits/numbers but > > still allow dashes and whitespaces? > > > Thanks in advance!