How to validate input using nestJs?  NestJs course [pt. 3]

How to validate input using nestJs? NestJs course [pt. 3]

Tech With Piotr

1 год назад

2,570 Просмотров

In the third part of the nestJs tutorial, I will show you how to validate data in nestJs app. We will learn about nestJS pipes and how to use them for input verification.

Starting code: https://github.com/piotrmol/nestjs-recipe-api/tree/nestjs-recipe-api-tutorial-lesson-2
Final code: https://github.com/piotrmol/nestjs-recipe-api/tree/nestjs-recipe-api-tutorial-lesson-3

Class-validator documentation: https://github.com/typestack/class-validator#validation-decorators

0:00 Introduction
0:27 What is nestJs pipe
01:10 Starting the nestJs server
01:40 NestJs uuid pipe
04:00 NestJs validation options
04:45 Validating string type
06:54 Validating arrays
08:23 Validating enum
09:03 Validating numeric value
09:56 Use global pipes

🎓 Enhance your learning journey! Visit my second channel, for valuable tips & tricks on mastering academics: https://www.youtube.com/@piotrTeaches 👨‍🎓👩‍🎓

Тэги:

#nestjs_validation #nestjs_validation_pipe #nestjs_validation_pipe_example #class_validator #nestjs_by_example #nestjs_tutorial_2022 #nestjs_in_depth #nodejs_framework #nestjs #nestjs_crash_course
Ссылки и html тэги не поддерживаются


Комментарии: