File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
packages/input-amount/src Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { LocalizeMixin } from '@lion/localize';
33import { ObserverMixin } from '@lion/core/src/ObserverMixin.js' ;
44import { LionInput } from '@lion/input' ;
55import { FieldCustomMixin } from '@lion/field' ;
6- import { isNumberValidator , randomOkValidator } from '@lion/validate' ;
6+ import { isNumberValidator } from '@lion/validate' ;
77import { parseAmount } from './parsers.js' ;
88import { formatAmount } from './formatters.js' ;
99
@@ -65,14 +65,10 @@ export class LionInputAmount extends FieldCustomMixin(LocalizeMixin(ObserverMixi
6565 }
6666
6767 getValidatorsForType ( type ) {
68- switch ( type ) {
69- case 'error' :
70- return [ isNumberValidator ( ) ] . concat ( super . getValidatorsForType ( type ) || [ ] ) ;
71- case 'success' :
72- return [ randomOkValidator ( ) ] . concat ( super . getValidatorsForType ( type ) || [ ] ) ;
73- default :
74- return super . getValidatorsForType ( type ) ;
68+ if ( type === 'error' ) {
69+ return [ isNumberValidator ( ) ] . concat ( super . getValidatorsForType ( type ) || [ ] ) ;
7570 }
71+ return super . getValidatorsForType ( type ) ;
7672 }
7773
7874 static get styles ( ) {
You can’t perform that action at this time.
0 commit comments