type · Browser and Node

# Constraint

`@toip-tools/mandates` · [View source](https://github.com/yourbuddyconner/toip-tools/blob/main/packages/mandates/src/types.ts#L11)

Import:

```ts
import { type Constraint } from "@toip-tools/mandates";
```

## Declaration

type:

```ts
type Constraint = { attr: string; when?: string[] } & (
  | { anyOf: string[] }
  | { noneOf: string[] }
  | { within: string[] }
  | { is: string | number | boolean }
  | { max: Units | number }
  | { min: Units | number }
  | { budget: Units; period: Period }
);
```

[Usage guide](https://toip.tools/toolkit/mandates/#usage) · [Error handling](https://toip.tools/toolkit/mandates/#errors) · [All exports](https://toip.tools/toolkit/mandates/api/)

---

This is the Markdown version of https://toip.tools/toolkit/mandates/api/Constraint/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
