
    `                     6    d dl m Z  d dlmZ edd            ZdS )   )between)	validatorNc                 ~    ||dk     s||dk     rt          d          t          t          |           ||          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   s      1lib/python3.11/site-packages/validators/length.pylengthr      sO    8 	C!GGS1WW;
 
 	
 3u::3C0000    )NN)r   utilsr   r    r   r   <module>r      sS                1 1 1 1 1 1r   