@@ -77,7 +77,8 @@ protected function _prepareForm()
7777 'label ' => __ ('Coupon Qty ' ),
7878 'title ' => __ ('Coupon Qty ' ),
7979 'required ' => true ,
80- 'class ' => 'validate-digits validate-greater-than-zero '
80+ 'class ' => 'validate-digits validate-greater-than-zero ' ,
81+ 'onchange ' => 'window.validateCouponGenerate(this) '
8182 ]
8283 );
8384
@@ -91,7 +92,8 @@ protected function _prepareForm()
9192 'required ' => true ,
9293 'note ' => __ ('Excluding prefix, suffix and separators. ' ),
9394 'value ' => $ couponHelper ->getDefaultLength (),
94- 'class ' => 'validate-digits validate-greater-than-zero '
95+ 'class ' => 'validate-digits validate-greater-than-zero ' ,
96+ 'onchange ' => 'window.validateCouponGenerate(this) '
9597 ]
9698 );
9799
@@ -103,7 +105,8 @@ protected function _prepareForm()
103105 'name ' => 'format ' ,
104106 'options ' => $ couponHelper ->getFormatsList (),
105107 'required ' => true ,
106- 'value ' => $ couponHelper ->getDefaultFormat ()
108+ 'value ' => $ couponHelper ->getDefaultFormat (),
109+ 'onchange ' => 'window.validateCouponGenerate(this) '
107110 ]
108111 );
109112
@@ -138,7 +141,8 @@ protected function _prepareForm()
138141 'title ' => __ ('Dash Every X Characters ' ),
139142 'note ' => __ ('If empty no separation. ' ),
140143 'value ' => $ couponHelper ->getDefaultDashInterval (),
141- 'class ' => 'validate-digits '
144+ 'class ' => 'validate-digits ' ,
145+ 'onchange ' => 'window.validateCouponGenerate(this) '
142146 ]
143147 );
144148
0 commit comments