# Checking Input: Validation Attributes

Validation attributes check a parameter's value before any line of the function runs: \[ValidateSet()\] allows only a list of choices and makes Tab fill them in, \[ValidateRange()\] keeps a number between two limits, \[ValidateNotNullOrEmpty()\] turns away an empty value, and Mandatory asks for one that's missing.

![Cheat sheet for the lesson Checking Input: Validation Attributes: Validation attributes check a parameter's value before any line of the function runs: \[ValidateSet()\] allows only a list of choices and makes Tab fill them in, \[ValidateRange()\] keeps a number between two limits…](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/4946cd2a551945399999444ab8e16b3d.webp)

- Category: PowerShell
- Level: Journeyman
- Tags: mandatory-parameter, powershell, tab-completion, validaterange, validateset, validation-attribute
- Updated: November 10, 2026

Source: https://www.ask-codey.com/cheat-sheets/powershell-parameter-validation-cheat-sheet
