Comments (4)
I'm unable to reproduce this. What jQuery and browser versions are you using?
from jquery-validator.
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.
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.
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)
- Validation fails for radio buttons. HOT 4
- Validation fails after second submit when new validation rules are added. HOT 2
- Would it be possible to add custom validations? HOT 6
- The size validation rule does not work for non numeric attributes. HOT 3
- Negative numbers are always validated as invalid.
- Length validation fails to flag max length has been exceeded when textarea contains linefeeds.
- Validation crashes when using [] brackets in name of input element.
- Validation fails when input element has no 'name' attribute.
- The jquery-validator.js plugin fails JSLint (The JavaScript Code Quality Tool from Douglas Crockford). HOT 1
- Laravel 4 package HOT 2
- ReadMe.md missing "!" HOT 1
- A way to know which validation failed? HOT 2
- Can't install in laravel 4 HOT 1
- laravel 4 HOT 1
- Can you update this to Laravel 4? HOT 3
- validate_accepted() ignores checked status on checkboxes HOT 1
- it didn't have packagist json code HOT 1
- where is the error message displayed HOT 2
- The size attribute with file input type doesn't seem to be working HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-validator.