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

Fix scale precision error message when digits is calculated as negative #1790

Merged

Conversation

SatsunkevichAlex
Copy link
Contributor

@SatsunkevichAlex SatsunkevichAlex commented Aug 3, 2021

a possible way to fix wrong scale precision error message

#1791

@dnfadmin
Copy link
Collaborator

dnfadmin commented Aug 3, 2021

CLA assistant check
All CLA requirements met.

@JeremySkinner
Copy link
Member

Hi @SatsunkevichAlex thanks for this. I think that rather assigning scale to precision, it'd be clearer if the modification was done at the point where the message argument is appended, so it would become:

.AppendArgument("Digits", actualIntegerDigits < 0 ? 0 : actualIntegerDigits)

I think this is a bit clearer than assigning the scale variable to the precision variable. If you could make that change then I'll get this merged in for the next release. Thanks!

@SatsunkevichAlex
Copy link
Contributor Author

Applied your recommendation

@JeremySkinner
Copy link
Member

Thanks, I'll aim to get this in over the weekend.

@JeremySkinner JeremySkinner changed the title Fix scale precision Fix scale precision error message when digits is calculated as negative Aug 5, 2021
@JeremySkinner JeremySkinner merged commit 016b415 into FluentValidation:main Aug 12, 2021
@JeremySkinner
Copy link
Member

Merged, thanks

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.

Invalid error message for ScalePrecision validation
3 participants