# validateOAuth2Draft

**Kind:** Function

**Source:** [`atloria-monorepo/apps/web/src/app/app/projects/[id]/technical-docs/components/PlaygroundOAuth2Config.tsx`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/apps/web/src/app/app/projects/[id]/technical-docs/components/PlaygroundOAuth2Config.tsx#L84)

The same rules the API enforces, run while the owner is still looking at the field.

Duplicated on purpose. The server is the one that decides — a browser check protects nothing —
but a rejection that arrives as a red banner after a save is a much worse way to learn that an
authorization endpoint has to be https than a message under the input as it is typed.

## Signature

```ts
function validateOAuth2Draft(draft: OAuth2Draft): OAuth2DraftValidation
```

## Parameters

| Name | Type |
|---|---|
| `draft` | `OAuth2Draft` |

**Returns:** `OAuth2DraftValidation`
