def METHOD_NAME(self, record):
    """Check if the record has the correct decimal number.
    :param record: the record to validate.
    :raise ValidationError if the amount doesn't respect the decimal amount
    """
    # Get the values to check. Either the value must be found into the
    # record regarding the 'field_name', either we will use the callback
    # function to retrieve data to check.
    if self.amount_field:
        values_to_check = record.get(self.amount_field)
    else:
        values_to_check = self.callback(record)
    # Ensure the values to check is a list and this list isn't empty. If
    # the list is empty, we can return without any check
    if type(values_to_check) is not list:
        values_to_check = [values_to_check]
    values_to_check = [v for v in values_to_check if v is not None]
    if not values_to_check:
        return
    # Check that the amount field has the correct decimals. If not, a
    # `ValidationError` error will be raised.
    # NOTE:
    #   an amount of "123,450" is true despite if we configure only 2
    #   decimals. In same way "123,4" is also a valid value.
    regexp = r'^-?(\d+(?:(,|.)\d{1,' + str(self.decimals) + r'})?)$'
    regexp = re.compile(regexp)
    for value in values_to_check:
        if not regexp.match(str(value)):
            decimal_string = 1 / pow(10, self.decimals)
            msg = f'`{value}` must be multiple of {decimal_string}'
            raise ValidationError(msg)