Function isMultipleOfMinimum

  • Checks if the given value is a multiple of the specified minimum value. Both the value and the minimum should be represented as strings to maintain precision and should have the same scale (e.g., both represented in wei for Ethereum transactions).

    Parameters

    • value: string | bigint

      The value to validate, as a string.

    • minimum: string | bigint

      The minimum value to validate against, as a string.

    Returns boolean

    • True if the value is a multiple of the minimum and greater than or equal to the minimum value; otherwise, false.

    Example

    isMultipleOfMinimum('123560', '10') // true
    isMultipleOfMinimum('123560', '11') // false