def METHOD_NAME(cls, v, values):
    if v > 0 and v >= values["total"]:
        msg = f"offset {v} cannot be equal or bigger than total {values['total']}, please check"
        raise ValueError(msg)
    return v