File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 582
582
// Add validation to forms
583
583
$ ( conf . form ) . each ( function ( i , form ) {
584
584
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
585
589
var $form = $ ( form ) ;
586
590
$window . trigger ( 'formValidationSetup' , [ $form , conf ] ) ;
587
591
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
589
594
$form . find ( '.has-help-txt' )
590
595
. unbind ( 'focus.validation' )
591
596
. unbind ( 'blur.validation' ) ;
Original file line number Diff line number Diff line change 80
80
} ,
81
81
numberFormat : function ( val , $input , config ) {
82
82
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' ) ) ;
84
84
} else {
85
85
throw new Error ( 'Using sanitation function "numberFormat" requires that you include numeraljs (http://http://numeraljs.com/)' ) ;
86
86
}
You can’t perform that action at this time.
0 commit comments