Giter Club home page Giter Club logo

Comments (4)

joecwallace avatar joecwallace commented on May 22, 2024

I'm unable to reproduce this. What jQuery and browser versions are you using?

from jquery-validator.

dkiestra avatar dkiestra commented on May 22, 2024

Hi Joe,

I'm using Mozilla Firefox v20.0 and jQuery-1.9.1.
I did some more testing and I made a test file.
Please see multi-select.html file in attachment.
Validation fails when no selection is made.

Also, when one or more selections are made,
it does not show the alert message with the selected options.

However, when I add the following code to the validate_required()
function it works.

if ($("[name="" + attribute + ""]").attr('multiple') === 'multiple') {
return $("[name="" + attribute + ""] option:selected").size() > 0;
}

Thanks for the excellent support, Douwe.

On 2013-04-09 08:40, Joe Wallace wrote:

I'm unable to reproduce this. What jQuery and browser versions are you
using?


Reply to this email directly or view it on GitHub
#18 (comment).

from jquery-validator.

joecwallace avatar joecwallace commented on May 22, 2024

Thanks for bringing this issue to my attention. I just pushed a fix. It's a little bit different than what you proposed, but you definitely set me down the path.

from jquery-validator.

dkiestra avatar dkiestra commented on May 22, 2024

Hi Joe,

I like your programming style. Elegant and compact.

There's one minor issue with your latest code.
When no selection is made I get a JavaScript error
due to value being null/undefined and the validation fails.

When I add the following code at the start of the validate_match()
function it works.

if (value === null) {
return false;
}

Thanks, Douwe.

On 2013-04-11 08:52, Joe Wallace wrote:

Thanks for bringing this issue to my attention. I just pushed a fix.
It's a little bit different than what you proposed, but you definitely
set me down the path.


Reply to this email directly or view it on GitHub
#18 (comment).

from jquery-validator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.