Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(BarcodeInput): remove business logic from behavior #170

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

AudBrou
Copy link
Contributor

@AudBrou AudBrou commented Nov 14, 2024

Je supprime la logique métier de vérification de la validité d'un EAN13 du design system.

@AudBrou AudBrou requested a review from sGeeK44 November 14, 2024 16:19
if (input.Length == Ean13.CheckedLength && !Ean13.Check(input))
return true;

return input.ToCharArray().Any(_ => !char.IsDigit(_));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On veux pas garder la saisie unique de chiffre ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Si t'as raison, j'ai eu un doute parce que le code39 n'est pas limité aux chiffres par construction, mais j'ai re vérifié l'example mapping et on avait bien écrit que des chiffres alors gardons ce comportement.

@AudBrou AudBrou force-pushed the task/fwms-946-remove-business-logic branch from 2165e70 to d523e25 Compare November 15, 2024 15:46
@AudBrou AudBrou force-pushed the task/fwms-946-remove-business-logic branch from d523e25 to cf6823b Compare November 15, 2024 16:32
@AudBrou AudBrou merged commit 26e0583 into master Nov 18, 2024
3 checks passed
@AudBrou AudBrou deleted the task/fwms-946-remove-business-logic branch November 18, 2024 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants