DecimalValidator
Validate that the input does not exceed the maximum number of digits expected, otherwise raise ValidationError.
Attributes
| Attribute | Type | Description |
|---|---|---|
| messages | dict | A dictionary of error message templates used to raise ValidationErrors for invalid numbers, exceeding total digits, exceeding decimal places, or exceeding whole digits. |
Constructor
Signature
def DecimalValidator(
max_digits: int,
decimal_places: int
)
Parameters
| Name | Type | Description |
|---|---|---|
| max_digits | int | The maximum number of digits allowed in the number. |
| decimal_places | int | The maximum number of decimal places allowed. |