> For the complete documentation index, see [llms.txt](https://kinesis-school-of-programming.gitbook.io/nestjs-unleashed/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kinesis-school-of-programming.gitbook.io/nestjs-unleashed/extra-module-4-file-management/file-validation.md).

# File validation

Validate the incoming files, much like it's done with the DTOs.

Remember that, when dealing with an entity's creation for example, first we care about validating the incoming data, and then about the actual logic? Here, it will be very similar. First, we'll ensure that the <mark style="color:blue;">`file`</mark> is properly validated. After that, we'll implement the logic related to it. So, let's get to work.
