Skip to content

Commit 2f76e31

Browse files
committed
general improvements in jsconf module
1 parent 3dd3681 commit 2f76e31

12 files changed

+34
-34
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.58
13+
* @version 2.2.beta.60
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.58
13+
* @version 2.2.beta.60
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.58
20+
* @version 2.2.beta.60
2121
*/
2222
(function($, window) {
2323

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.58
8+
* @version 2.2.beta.60
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: 5 additions & 3 deletions
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.58
10+
* @version 2.2.beta.60
1111
*/
1212
(function($) {
1313

@@ -28,8 +28,10 @@
2828
$elem.attr('data-validation', attr.validation);
2929

3030
$.each(attr, function(name, val) {
31-
if( name != 'validation' ) {
32-
$elem.attr('data-validation-'+name, typeof val == 'string' ? val : 'true');
31+
if( name != 'validation' && val !== false) {
32+
if( val === true )
33+
val = 'true';
34+
$elem.valAttr(name, val);
3335
}
3436
});
3537
});

form-validator/jsconf.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/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.58
13+
* @version 2.2.beta.60
1414
*/
1515
(function($) {
1616

form-validator/security.dev.js

Lines changed: 19 additions & 21 deletions
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.58
16+
* @version 2.2.beta.60
1717
*/
1818
(function($, window) {
1919

@@ -154,7 +154,7 @@
154154
$.formUtils.addValidator({
155155
name : 'strength',
156156
validatorFunction : function(val, $el, conf) {
157-
var requiredStrength = $el.valAttr('strength')
157+
var requiredStrength = $el.valAttr('strength') || 2;
158158
if(requiredStrength && requiredStrength > 3)
159159
requiredStrength = 3;
160160

@@ -278,9 +278,22 @@
278278
}
279279

280280
$el.bind('keyup', function() {
281-
var val = $(this).val();
282-
var $parent = typeof config.parent == 'undefined' ? $(this).parent() : $(config.parent);
283-
var $displayContainer = $parent.find('.strength-meter');
281+
var val = $(this).val(),
282+
$parent = typeof config.parent == 'undefined' ? $(this).parent() : $(config.parent),
283+
$displayContainer = $parent.find('.strength-meter'),
284+
strength = $.formUtils.validators.validate_strength.calculatePasswordStrength(val),
285+
css = {
286+
background: 'pink',
287+
color : '#FF0000',
288+
fontWeight : 'bold',
289+
border : 'red solid 1px',
290+
borderWidth : '0px 0px 4px',
291+
display : 'inline-block',
292+
fontSize : config.fontSize,
293+
padding : config.padding
294+
},
295+
text = config.bad;
296+
284297
if($displayContainer.length == 0) {
285298
$displayContainer = $('<span></span>');
286299
$displayContainer
@@ -294,20 +307,6 @@
294307
$displayContainer.show();
295308
}
296309

297-
var strength = $.formUtils.validators.validate_strength.calculatePasswordStrength(val);
298-
var css = {
299-
background: 'pink',
300-
color : '#FF0000',
301-
fontWeight : 'bold',
302-
border : 'red solid 1px',
303-
borderWidth : '0px 0px 4px',
304-
display : 'inline-block',
305-
fontSize : config.fontSize,
306-
padding : config.padding
307-
};
308-
309-
var text = config.bad;
310-
311310
if(strength == 1) {
312311
text = config.weak;
313312
}
@@ -324,7 +323,6 @@
324323
text = config.strong;
325324
}
326325

327-
328326
$displayContainer
329327
.css(css)
330328
.text(text);
@@ -333,7 +331,7 @@
333331
});
334332

335333
var requestServer = function(serverURL, $element, val, conf, callback) {
336-
var reqParams = $element.valAttr('req-params');
334+
var reqParams = $element.valAttr('req-params') || {};
337335
if( !reqParams )
338336
reqParams = {};
339337
if( typeof reqParams == 'string' ) {

form-validator/security.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.

0 commit comments

Comments
 (0)