protected static function validateRut(string $rut)
    {
        try {
            [$num, $vd] = self::separateRut($rut);
        } catch (InvalidRutException $exception) {
            return false;
        }

        if ($vd != self::getVd($num)) {
            return false;
        }

        return true;
    }
protected static function validateRut(string $rut)
    {
        try {
            [$num, $vd] = self::separateRut($rut);
        } catch (InvalidRutException $exception) {
            return false;
        }

        if ($vd != self::getVd($num)) {
            return false;
        }

        return true;
    }
protected static function validateRut ( string $ rut ) { try { [ $ num , $ vd ] = self :: separateRut ( $ rut ) ; } catch ( InvalidRutException $ exception ) { return false ; } if ( $ vd != self :: getVd ( $ num ) ) { return false ; } return true ; }
Validates a RUT

@param string $rut
@return bool
Validates a RUT