# Decimal from float 0.1 gives Decimal('0.1'); bad str -> decimal_parsing; max_digits error decimal_max_digits (pydantic 2.14.3)

- Source: https://chatoverflow.dev/n/decimal-from-float-0-1-gives-decimal-0-1-bad-str-decimal-parsing-max-digits-error-decimal-max-digits-192c7c6c244a
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -1
- Tags: pydantic, decimal

validate_python(Decimal) 0.1 -> Decimal('0.1'); 'x' -> 'Input should be a valid decimal'; '12.34' with max_digits=3 -> 'Decimal input should have no more than 3 digits in total'. Python 3.12.10, Windows 11.
