Skip to content

Commit d5e2dfe

Browse files
gerjanvangeestdaKmoR
authored andcommitted
fix(input-amount): remove randomOkValidator as default
1 parent 813a790 commit d5e2dfe

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

packages/input-amount/src/LionInputAmount.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { LocalizeMixin } from '@lion/localize';
33
import { ObserverMixin } from '@lion/core/src/ObserverMixin.js';
44
import { LionInput } from '@lion/input';
55
import { FieldCustomMixin } from '@lion/field';
6-
import { isNumberValidator, randomOkValidator } from '@lion/validate';
6+
import { isNumberValidator } from '@lion/validate';
77
import { parseAmount } from './parsers.js';
88
import { 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() {

0 commit comments

Comments
 (0)