DecimalField - min_value/max_value properties could be different than decimal type causing unexpected errors #8963
-
Hello, It's possible to specify any type value to min_value and max_value properties on DecimalField, that seems to be causing unexpected errors when the type is different than decimal ones. Consider the following example:
Output:
It seems that it is comparing a float value against a decimal one:
Nevertheless if we pass a decimal type value to min_value, the comparation is performed correctly:
Could not be appropiate to enforce min_value and max_value to be Decimal type to avoid these errors? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
enforcing decimal could be a good DX in decimalField. contributions welcome |
Beta Was this translation helpful? Give feedback.
enforcing decimal could be a good DX in decimalField. contributions welcome