avram
avram copied to clipboard
validate_numeric shows wrong message when using floats
https://github.com/luckyframework/avram/blob/549639bb956a3f59d409800714e0021d722b4d66/src/avram/i18n_backend.cr#L17-L18
Using this code:
validate_numeric number, greater_than: 0.01, less_than: 0.99
Would show the error "must be less than 0" or "must be greater than 0" since the string uses %d instead of %f. Though, even with %f, you'll get floating precision like must be less than 0.990000