04 Validatioin in Nest JS and DTO objects | Nest JS Node JS tutorials

preview_player
Показать описание
In this video, we are going to look at how to do validations of the request coming to the controller. Validating the request object is very important, and I will show you in this video how you can create a DTO and then define rules inside that DTO so that you can run validations.

Рекомендации по теме
Комментарии
Автор

i watch so much video, but only this video i understood, thanks

Fadhilx
Автор

Really enjoying your tutorials thus far, thank you for being thorough and clear!

Tangental
Автор

if you are interested in watching this whole series, this is what you are in for, I thought it useful to calculate and share, since somehow Youtube doesn't automatically provide this information (?)
TOTAL SERIES DURATION 7:16:34
Introduction to Nest JS - A Node JS framework - from the basics | Nest js tutorials 0:05:59
01 Install Nest JS and how Nest Js route works | Nest JS Node JS tutorials 0:10:32
02 Creating a Module and Controller in Nest JS | Node JS, Javascript, Typescript 0:11:30
03 Depedency Injection in Nest JS | Inject Service in Controller | Node JS, Javascript, Typescript 0:07:58
04 Validatioin in Nest JS and DTO objects | Nest JS Node JS tutorials 0:10:14
06 Saving quiz data to Database in TypeORM using services and Repository NestJs tutorieal 0:08:04
07 Creating the Question entity for Quiz 0:12:54
08 Entity relation with TypeORM and saving questions 0:16:48
09 Refactoring the quiz module and moving things to make more sense using VS Code 0:05:57
10 Additing options to a questions using Type ORM relations - Part 1 0:10:34
11 Additing options to a questions using Type ORM relations - Part 2 0:12:18
12 Loading quiz with questions - query, joins and nested relations in TypeORM 0:14:14
13 Show Quiz with questions and options | Type ORM second level relation 0:06:11
14 Nestjs Config module to work with env files and hide your secrets from codebase 0:14:55
15 Nestjs | User registration and password hash with bcrypt with TypeORM Hooks 0:26:32
16 How to run or setup migrations in Nest JS with TypeORM 0:17:23
17 NestJS JWT Token for API authentication, Passport - API security 0:37:31
18 Nest JS JWT Secret through config and env file 0:10:13
19 Nest JS JWT Swagger API documentation setup 0:12:29
20 Pagination with Nest JS - How to get paginated data with Type ORM and Nest JS 0:11:14
21 Nest JS TypeORM Seeder setup | How to use Seeds and Factories with NestJs and TypeORM and more 0:13:57
22 Nest JS adding columns to a database table TypeORM using migrations 0:11:10
23 Nest JS How to use middleware in Nest JS and it's concept 0:09:40
24 Nest JS Custom exceptions and why they are useful 0:07:10
25 Nest JS Trick to use sample data while development 0:12:27
26 Nest JS Guards what are they and how to use them 0:11:50
28 Nest JS Events and how to do event driven development in Node Nest JS framework 0:18:41
27 Nest JS Dynamic role guard to handle multiple roles for different API 0:10:42
29 Nestjs API to upload files 0:15:04
30 Nestjs and Meilisearch backend implementation 0:22:54
31 Unlocking Full Text Search with NestJs, Meilisearch and ReactJs 0:15:48
NestJs migrations with TypeORM 0.3 (latest) - How to set it up from scratch using Datasource 0:23:41

az_spain
Автор

Nice kinda like Store Request in Laravel

tanzimibthesam
Автор

Thank you for this information. but what if I add another attribute in postman that is not define in dto? will there be an error message?

hrisaccount
Автор

hi there, wanna ask abt how to handle boolean, coz from postman when i send true/false, the value inserted in database is always 0, and when i send 1 or 0, it says value has to be a boolean. Im using @IsBoolean decorator in dto files

adityafawzan
Автор

Hello, I get an empty Post, seems like I can't get what's inside the Raw Body

mohamedaminetrigui
Автор

Can we use Schemas from mongoose instead of using DTO?

framework
Автор

Your content is awesome, but please don't use dark theme on vscode and light theme on postman, this is a crime and you almost blind me

rafael.aloizio
Автор

DTO doesn't work. it return empty object without validation. vscode highlight file name in red color but there is no error its a simple DTO
export class CreateCustomerDto {
id: number;
name: string;
}

muhammadharis
visit shbcf.ru