# Data Annotations

*noun*

say it: **“DAY-tuh an-oh-TAY-shunz”** **/ˈdeɪtə ˌænoʊˈteɪʃənz/**

Attributes on a model's properties, such as \[Required\] and \[Range\], that set validation rules.

## What is **Data Annotations**?

**Data annotations** are validation attributes on properties: `[Required]`, `[StringLength]`, `[Range]`, `[EmailAddress]`.

```csharp
public sealed class SignupRequest
{
    [Required, EmailAddress] public string Email { get; set; } = "";
    [Required, StringLength(100, MinimumLength = 8)] public string Password { get; set; } = "";
}
```

## In a sentence

- “With **data annotations**, \[Required\] and \[Range(0, 1000)\] protect the Price property.”

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/data-annotations
