File tree Expand file tree Collapse file tree
laterpay/asset_sources/js Expand file tree Collapse file tree Original file line number Diff line number Diff line change 692692 validateVoucherCode = function ( voucherInput , $wrapper , type ) {
693693 var voucherCode = voucherInput . val ( ) ;
694694
695- // Allows less than 6 Characters #1397
696- if ( voucherCode . length <= 6 ) {
695+ if ( voucherCode . length === 6 ) {
697696 var globalVouchers = $o . globalVouchers . data . vouchers ;
698697 if ( typeof $o . globalVouchers . data . vouchers === 'string' ) {
699698 globalVouchers = JSON . parse ( $o . globalVouchers . data . vouchers ) ;
779778 } else {
780779 $wrapper . find ( '.lp_js_voucher_msg' ) . text ( lpVars . i18n . codeTooShort ) ;
781780 $wrapper . find ( '.lp_js_voucher_msg' ) . css ( 'display' , 'block' ) ;
781+ // Disabled save button if there are less than 6 characters. #1397
782+ $wrapper . find ( '.button-primary' ) . attr ( 'disabled' , 'disabled' ) ;
782783 return ;
783784 }
784785
You can’t perform that action at this time.
0 commit comments