Skip to content

Commit d487870

Browse files
committed
datalist now supported in IE version <=9
1 parent b54f292 commit d487870

12 files changed

+30
-18
lines changed

form-validator/date.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
* @website http://formvalidator.net/#location-validators
1212
* @license Dual licensed under the MIT or GPL Version 2 licenses
13-
* @version 2.2.beta.86
13+
* @version 2.2.beta.88
1414
*/
1515
(function($) {
1616

form-validator/file.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
* @website http://formvalidator.net/
1212
* @license Dual licensed under the MIT or GPL Version 2 licenses
13-
* @version 2.2.beta.86
13+
* @version 2.2.beta.88
1414
*/
1515
(function($, window) {
1616

form-validator/form-test.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@
290290
<h2>HTML5 attributes</h2>
291291
<div class="form-group">
292292
<label class="control-label">type="email"</label>
293-
<input type="text" required="required" list="mejl" />
294-
<datalist id="mejl">
293+
<input type="text" required="required" list="da-mejl" />
294+
<datalist id="da-mejl">
295295
<option value="Test">Test</option>
296296
<option value="test2">test2</option>
297297
<option value="test3">test3</option>

form-validator/html5.dev.js

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*
1818
* @website http://formvalidator.net/
1919
* @license Dual licensed under the MIT or GPL Version 2 licenses
20-
* @version 2.2.beta.86
20+
* @version 2.2.beta.88
2121
*/
2222
(function($, window) {
2323

@@ -93,11 +93,23 @@
9393
}
9494

9595
if( !SUPPORTS_DATALIST && $input.attr('list') ) {
96-
var suggestions = [];
97-
$('#'+$input.attr('list')+' option').each(function() {
98-
var $opt = $(this);
99-
suggestions.push($opt.attr('value') || $opt.text());
100-
});
96+
var suggestions = [],
97+
$list = $('#'+$input.attr('list'));
98+
99+
$list.find('option').each(function() {
100+
suggestions.push($(this).text());
101+
});
102+
103+
if( suggestions.length == 0 ) {
104+
// IE fix
105+
var opts = $.trim($('#'+$input.attr('list')).text()).split('\n')
106+
$.each(opts, function(i, option) {
107+
suggestions.push($.trim(option));
108+
});
109+
}
110+
111+
$list.remove();
112+
101113
$.formUtils.suggest( $input, suggestions );
102114
}
103115

form-validator/html5.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

form-validator/jquery.form-validator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* @website http://formvalidator.net/
77
* @license Dual licensed under the MIT or GPL Version 2 licenses
8-
* @version 2.2.beta.86
8+
* @version 2.2.beta.88
99
*/
1010
(function ($) {
1111

form-validator/jquery.form-validator.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

form-validator/jsconf.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* @website http://formvalidator.net/#location-validators
99
* @license Dual licensed under the MIT or GPL Version 2 licenses
10-
* @version 2.2.beta.86
10+
* @version 2.2.beta.88
1111
*/
1212
(function($) {
1313

form-validator/location.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
* @website http://formvalidator.net/#location-validators
1212
* @license Dual licensed under the MIT or GPL Version 2 licenses
13-
* @version 2.2.beta.86
13+
* @version 2.2.beta.88
1414
*/
1515
(function($) {
1616

form-validator/security.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* - cvv
1414
*
1515
* @website http://formvalidator.net/#security-validators
16-
* @version 2.2.beta.86
16+
* @version 2.2.beta.88
1717
*/
1818
(function($, window) {
1919

form-validator/sweden.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* @website http://formvalidator.net/#swedish-validators
1515
* @license Dual licensed under the MIT or GPL Version 2 licenses
16-
* @version 2.2.beta.86
16+
* @version 2.2.beta.88
1717
*/
1818
(function($, window) {
1919

form-validator/uk.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
* @website http://formvalidator.net/#uk-validators
1111
* @license Dual licensed under the MIT or GPL Version 2 licenses
12-
* @version 2.2.beta.86
12+
* @version 2.2.beta.88
1313
*/
1414
$.formUtils.addValidator({
1515
name : 'ukvatnumber',

0 commit comments

Comments
 (0)