def validate_field_name(bases: list[type[BaseModel]], field_name: str) -> None:
    """Ensure that the field's name does not shadow an existing attribute of the model.

    Args:
        bases: List of base models to check for shadowed attrs.
        field_name: name of attribute

    Raises:
        VarNameError: If state var field shadows another in its parent state
    """
    from reflex.utils.exceptions import VarNameError

    # can't use reflex.config.environment here cause of circular import
    reload = os.getenv("__RELOAD_CONFIG", "").lower() == "true"
    base = None
    try:
        for base in bases:
            if not reload and getattr(base, field_name, None):
                pass
    except TypeError as te:
        msg = (
            f'State var "{field_name}" in {base} has been shadowed by a substate var; '
            f'use a different field name instead".'
        )
        raise VarNameError(msg) from te
Ensure that the field's name does not shadow an existing attribute of the model.

    Args:
        bases: List of base models to check for shadowed attrs.
        field_name: name of attribute

    Raises:
        VarNameError: If state var field shadows another in its parent state
    
reflex/base.py