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 error message for numerical validation with non integers #948

Merged

Conversation

garymardell
Copy link
Contributor

Fixes #858

Was just looking through the issues list and this seemed like an easy fix. Despite the condition being numerical I think using the string based representation of the number makes more sense as a default and will work for all numbers (floats / negative etc) of any precision. A user can pass in a custom specific message with different formatting if required (say, they only wanted specific precision for floats)

Copy link
Member

@jwoertink jwoertink left a comment

Choose a reason for hiding this comment

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

🚀 great solution!

@jwoertink jwoertink merged commit 2c059d7 into luckyframework:main Jun 25, 2023
8 of 9 checks passed
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.

validate_numeric shows wrong message when using floats
2 participants