From d5e2dfe38ebb0729cc06a66088c1b5cb30ce4158 Mon Sep 17 00:00:00 2001 From: qa46hx Date: Wed, 1 May 2019 21:49:07 +0200 Subject: [PATCH] fix(input-amount): remove randomOkValidator as default --- packages/input-amount/src/LionInputAmount.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/input-amount/src/LionInputAmount.js b/packages/input-amount/src/LionInputAmount.js index 5390c2908..69d93e9cf 100644 --- a/packages/input-amount/src/LionInputAmount.js +++ b/packages/input-amount/src/LionInputAmount.js @@ -3,7 +3,7 @@ import { LocalizeMixin } from '@lion/localize'; import { ObserverMixin } from '@lion/core/src/ObserverMixin.js'; import { LionInput } from '@lion/input'; import { FieldCustomMixin } from '@lion/field'; -import { isNumberValidator, randomOkValidator } from '@lion/validate'; +import { isNumberValidator } from '@lion/validate'; import { parseAmount } from './parsers.js'; import { formatAmount } from './formatters.js'; @@ -65,14 +65,10 @@ export class LionInputAmount extends FieldCustomMixin(LocalizeMixin(ObserverMixi } getValidatorsForType(type) { - switch (type) { - case 'error': - return [isNumberValidator()].concat(super.getValidatorsForType(type) || []); - case 'success': - return [randomOkValidator()].concat(super.getValidatorsForType(type) || []); - default: - return super.getValidatorsForType(type); + if (type === 'error') { + return [isNumberValidator()].concat(super.getValidatorsForType(type) || []); } + return super.getValidatorsForType(type); } static get styles() {