Skip to content

Commit 5e8f788

Browse files
committed
implemented error-msg-container, issue victorjonsson#224
1 parent d06ef79 commit 5e8f788

File tree

10 files changed

+21
-17
lines changed

10 files changed

+21
-17
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.66
13+
* @version 2.2.beta.68
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.66
13+
* @version 2.2.beta.68
1414
*/
1515
(function($, window) {
1616

form-validator/html5.dev.js

Lines changed: 1 addition & 1 deletion
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.66
20+
* @version 2.2.beta.68
2121
*/
2222
(function($, window) {
2323

form-validator/jquery.form-validator.js

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

1212
'use strict';
1313

1414
var $window = $(window),
1515
_getInputParentContainer = function($elem) {
16-
var $parent = $elem.parent();
17-
if( !$parent.hasClass('form-group') ) {
18-
var $formGroup = $parent.closest('.form-group');
19-
if( $formGroup.length ) {
20-
return $formGroup.eq(0);
16+
if( $elem.valAttr('error-msg-container') ) {
17+
return $( $elem.valAttr('error-msg-container') );
18+
} else {
19+
var $parent = $elem.parent();
20+
if( !$parent.hasClass('form-group') ) {
21+
var $formGroup = $parent.closest('.form-group');
22+
if( $formGroup.length ) {
23+
return $formGroup.eq(0);
24+
}
2125
}
26+
return $parent;
2227
}
23-
return $parent;
2428
},
2529
_applyErrorStyle = function($elem, conf) {
2630
$elem

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

Lines changed: 2 additions & 2 deletions
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.66
10+
* @version 2.2.beta.68
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.66
13+
* @version 2.2.beta.68
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.66
16+
* @version 2.2.beta.68
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.66
16+
* @version 2.2.beta.68
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.66
12+
* @version 2.2.beta.68
1313
*/
1414
$.formUtils.addValidator({
1515
name : 'ukvatnumber',

0 commit comments

Comments
 (0)