Skip to content

Commit 0f95574

Browse files
committed
Bug fix in sanitation module
1 parent 73c8b60 commit 0f95574

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

form-validator/jquery.form-validator.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,10 +582,15 @@
582582
// Add validation to forms
583583
$(conf.form).each(function (i, form) {
584584

585+
// Make a reference to the config for this form
586+
form.validationConfig = conf;
587+
588+
// Trigger jQuery event that we're about to setup va
585589
var $form = $(form);
586590
$window.trigger('formValidationSetup', [$form, conf]);
587591

588-
// Remove all event listeners previously added
592+
// Remove classes and event handlers that might have been
593+
// added by a previous call to $.validate
589594
$form.find('.has-help-txt')
590595
.unbind('focus.validation')
591596
.unbind('blur.validation');

form-validator/sanitize.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
},
8181
numberFormat : function(val, $input, config) {
8282
if( 'numeral' in window ) {
83-
val = numeral(val).format( $input.attr('data-number-format') );
83+
val = numeral(val).format( $input.attr('data-sanitize-number-format') );
8484
} else {
8585
throw new Error('Using sanitation function "numberFormat" requires that you include numeraljs (http://http://numeraljs.com/)');
8686
}

0 commit comments

Comments
 (0)