o
    ˷e                     @   s*   d dl m Z  d dlmZ edddZdS )   )between)	validatorNc                 C   s:   |dur|dk s|dur|dk rt dtt| ||dS )au  
    Return whether or not the length of given string is within a specified
    range.

    Examples::

        >>> length('something', min=2)
        True

        >>> length('something', min=9, max=9)
        True

        >>> length('something', max=5)
        ValidationFailure(func=length, ...)

    :param value:
        The string to validate.
    :param min:
        The minimum required length of the string. If not provided, minimum
        length will not be checked.
    :param max:
        The maximum length of the string. If not provided, maximum length
        will not be checked.

    .. versionadded:: 0.2
    N    z-`min` and `max` need to be greater than zero.)minmax)AssertionErrorr   len)valuer   r    r
   H/var/www/ideatree/venv/lib/python3.10/site-packages/validators/length.pylength   s
    r   )NN)r   utilsr   r   r
   r
   r
   r   <module>   s    