# ModelState

*noun*

say it: **“MOD-ul-stayt”** **/ˈmɒdəlsteɪt/**

The place where ASP.NET Core records whether a request's values bound and passed validation, with an error for each field.

## What is **ModelState** in ASP.NET Core?

**ModelState** — Where ASP.NET Core records how model binding and validation went for a request. `ModelState.IsValid` is `false` if any value didn't fit or broke a rule, and the view can show each error beside its field.

```csharp
[HttpPost]
public IActionResult Create(Product product)
{
    if (!ModelState.IsValid) return View(product); // show the form with its errors
    productDao.Add(product);
    return RedirectToAction("Index");
}
```

## In a sentence

- “The action checks **ModelState**.IsValid and shows the form again when the price is missing.”

Level: Journeyman · [More ASP.NET Core terms at this level](https://www.ask-codey.com/glossary?category=aspnet-core&level=3)

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/modelstate
