> ## 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_IsValidDetail (Python)

> Return a row of valid, reason and location.

Return a row of valid, reason and location. valid defines the validity of geometry, reason defines the
reason why it is not valid and location defines the location where it is not valid
If the geometry is valid then it will return null for reason and location

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

## Signature

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

ST_IsValidDetail(
    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">
  Row of valid, reason and location
</ResponseField>


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