# Standard.validate()

Check a single table against the standard.

Usage

[Source](https://github.com/posit-dev/pointblank/blob/main/pointblank/standard.py#L1141-L1194)

``` python
Standard.validate(
    data,
    tbl_name=None,
)
```

This compiles the standard for the table (with [`to_validate()`](../reference/Standard.to_validate.md#pointblank.Standard.to_validate)) and interrogates it. It's what [`apply()`](../reference/Standard.apply.md#pointblank.Standard.apply) does for each table it finds, so it's a quick way to try a standard on one table, or to check a table that's not part of a source.

## Parameters

`data: IntoDataFrame`  
The table to validate. Any table type that [Validate](../reference/Validate.md#pointblank.Validate) takes can be used.

`tbl_name: str | None = None`  
The name of the table, for the validation's `tbl_name=`.

## Returns

`Validate`  
An interrogated [Validate](../reference/Validate.md#pointblank.Validate) object.

## Examples

Let's try a standard for amount columns on a table of refunds before applying it to a whole warehouse.

``` python
import pointblank as pb
import polars as pl

amount_standard = pb.Standard(
    name="amount-columns",
    steps=[
        pb.Step("col_vals_not_null", columns=pb.contains("amount")),
        pb.Step("col_vals_ge", columns=pb.contains("amount"), value=0),
    ],
)

refunds = pl.DataFrame({"refund_id": [1, 2, 3], "refund_amount": [15.0, 0.0, -3.5]})

amount_standard.validate(refunds, tbl_name="refunds")
```

[TABLE]

The negative refund fails the second step. The validation is an ordinary interrogated [Validate](../reference/Validate.md#pointblank.Validate) object, so a check like `all_passed()` works on it as well.
