Skip to content

validate_rut

cl_forge.verify.validate_rut

validate_rut(digits: int, verifier: str) -> bool

Validates a Chilean RUT/RUN by checking if the provided verifier digit matches the calculated one using Module 11 algorithm.

Parameters:

Name Type Description Default
digits int

Numeric part of the RUT/RUN (digits only).

required
verifier str

Verifier digit to validate against: "0".."9" or "K".

required

Returns:

Type Description
bool

True if the verifier is valid for the given correlative, False otherwise.

Source code in src/cl_forge/core/impl/rs_cl_forge/rs_verify.pyi
def validate_rut(digits: int, verifier: str) -> bool:
    """
    Validates a Chilean RUT/RUN by checking if the provided verifier digit
    matches the calculated one using Module 11 algorithm.

    Parameters
    ----------
    digits : int
        Numeric part of the RUT/RUN (digits only).
    verifier : str
        Verifier digit to validate against: "0".."9" or "K".

    Returns
    -------
    bool
        `True` if the verifier is valid for the given correlative,
        `False` otherwise.
    """