# `NeonDbError: null value in column "…" of relation "…" violates not-null constraint`

**Where it appears:** Terminal or Vercel runtime logs

**What it means:** The database refused to save a row because a required column was left empty (`null`).

## Likely causes

- Form input wasn't validated with a schema before running the `INSERT` or `UPDATE` query.
- A form field's `name` attribute in HTML doesn't match the field name read in the Server Action.

## Message for your agent

```text
The database threw `null value in column violates not-null constraint`. Validate the input with a schema in the Server Action before touching the database, and return a friendly field error if it's empty.
```

**Prevention:** Validate every Server Action input with a schema before running any database query.

---
Source: [Agentic Makers](https://agenticmakers.app/en/help/errors/postgres-null-value-in-column-violates-not-null-constraint) · License: CC BY 4.0
