> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ST_IsValidReason (Python)

> Provides a text description of why a geometry is not valid or states that it is valid.

Provides a text description of why a geometry is not valid or states that it is valid.
An optional flag parameter can be provided for additional options.

SQL reference: [`ST_IsValidReason`](/reference/wherobots-db/geometry-data/validation/ST_IsValidReason)

## Signature

```python theme={"system"}
from sedona.spark.sql.st_functions import ST_IsValidReason

ST_IsValidReason(
    geometry: ColumnOrName,
    flag: Optional[Union[ColumnOrName, int]] = None,
) -> Column
```

## Parameters

<ParamField path="geometry" type="ColumnOrName" required>
  Geometry column to validate.
</ParamField>

<ParamField path="flag" type="Optional[Union[ColumnOrName, int]]" default="None">
  Optional flag to modify behavior of the validity check.
</ParamField>

## Returns

<ResponseField name="return" type="Column">
  Description of validity as a string column.
</ResponseField>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.