Angular: CustomValidators with Reactive Forms Login + Register 2/2 | Blog Project V-08

preview_player
Показать описание
Thumbnail remade on 06.06.2020.
Link to repository:

If you clone the repo, don't forget to replace the Postgres Database Url in the .env file.

Timestamps:
00:00 Welcome and short overview over the video
00:20 Video Structure
00:31 Video Outcome, look at the final form
01:05 Look at user story for video-08 in trello
01:40 Create new feature branch from develop
02:33 Add Class CustomValidators and function passwordContainsNumber()
04:40 Validate and look at the regex for containing a number with a regex tester
06:40 Add displaying error in the html if password is not containing number
08:30 Add passwordsMatch() to CustomValidators
11:50 Add displaying error in the html for passwordsMatch()
12:50 Rename and fix error
13:30 Check form in browser
14:28 Commit Changes and close feature branch
15:17 Close Trello Story
15:35 Look at the next Video

I appreciate every feedback in the comments and would be happy if you also like && subscribe :)

NestJS is used in v7.
Angular is used in v9.
Nodejs is used in v12.
NPM is used in v6.

Main Frameworks:

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

In the validator would it not be better to have if(password !== null || confirm !== null || password !== confirm ){return error}? Then you don’t need the else and have return null after the if statement

simon_smale
Автор

A question here.

If I have another component and I want to use the same CustomValidator, how can I achieve this without having to import this component into the other one? (say these two components share nothing in common but this CustomValidator class would be usefull to both)

alinandrei
visit shbcf.ru