Angular Forms Tutorial - 23 - Custom Validation

  Рет қаралды 117,065

Codevolution

Codevolution

Күн бұрын

Пікірлер: 43
@simpleway2022
@simpleway2022 6 жыл бұрын
This guy is a genius!!! too complex for me.
@mohangudimetta0511
@mohangudimetta0511 3 жыл бұрын
Kudos Vishwas and thanks for your time and effort to make such a great tutorial on Angular and your way of explaining the topics is really appreciated
@EduShaman
@EduShaman 2 жыл бұрын
For a newbie this was a pretty quick drive through factory functions . Especislly while understanding how the control transfers .
@bunthaideng2492
@bunthaideng2492 6 жыл бұрын
OMG! This is very complex.
@shamshtabrez6492
@shamshtabrez6492 6 жыл бұрын
Your video helped me to learn custom validations. You are one of the best tutors on youtube.
@chaitanyayash2958
@chaitanyayash2958 2 жыл бұрын
This particular video in particular is superb.
@user-rp9iis1en6h
@user-rp9iis1en6h 3 жыл бұрын
thanks a lot. This tutorial is so easy to understand. I would like to suggest everyone to go through sequentially.
@ABsazerNer
@ABsazerNer 4 жыл бұрын
This is the best validation function I've ever had, thank you so much
@amanraj3646
@amanraj3646 5 жыл бұрын
Awesome but the ending part became too complex for me why s need of factory function I didn't got. Instead in the original function we could have checked control.value with a number of constant regex and if anyone matches we return that .it sounds correct na?
@jamuna5181
@jamuna5181 3 жыл бұрын
Although complex but your explanation makes it easy to understand :)
@thehulk2642
@thehulk2642 2 жыл бұрын
thanks. 🙂 very easy to understand . step by step. it goes into mind.
@renanrosa5527
@renanrosa5527 2 жыл бұрын
Thanks. It worked just fine.
@khurrammazhar9351
@khurrammazhar9351 4 жыл бұрын
You are truly a genius
@lavanyaverma7739
@lavanyaverma7739 3 жыл бұрын
If you guys strictly want only "admin" to be forbidden and not "aadmin" or "administration" or any other word containing the string 'admin', just supply the parameter as "/\badmin\b/". Example: forbiddenNameValidator(/\badmin\b/)
@naimeahmed1192
@naimeahmed1192 3 жыл бұрын
Very well explained. Thank you guru
@rahulg125
@rahulg125 5 жыл бұрын
Hi Vishwas, u mentioned since the custom validation is used in most components we are creating a separate file and sharing it in all components. Could we create a custom service class where we can write the custom validation codes and inject it wherever needed. Is it possible? means creating a custom service class instead of file?
@manikmahashabde2946
@manikmahashabde2946 3 жыл бұрын
Very helpful 👍 thanks a lot 🙂
@vishtrinity
@vishtrinity 5 жыл бұрын
why are we not sending the parameter of type control in the forbiddenNameValidator function at 4:23
@happyhandsome2081
@happyhandsome2081 2 жыл бұрын
My question is the same. Parameters should be make sense by send from a business oriented controller, but not sending from root controller App Controller. It is my question.
@ridloalimudin140
@ridloalimudin140 5 жыл бұрын
i love the way you teach. do it more...... Thanks
@sarwatafroz9321
@sarwatafroz9321 4 жыл бұрын
In custom validation of forbidden name we cannot write any word using forbidden word we use like admin and admins it shows error on admins also
@oswaldosilva7750
@oswaldosilva7750 5 жыл бұрын
great way to explain. Thanks for sharing
@user-jtwe1xrf2n
@user-jtwe1xrf2n 3 жыл бұрын
Thank you very much!
@rahulkathar364
@rahulkathar364 3 жыл бұрын
Can we create multiple validatorFn functions?
@laiparekh7114
@laiparekh7114 2 жыл бұрын
Didn't understand the stuff you did in app.compnent.ts file. Can anyone please explain
@pravinmisra
@pravinmisra 3 жыл бұрын
How can we restrict multiple words for userName field?
@bichitranandamalik7913
@bichitranandamalik7913 4 жыл бұрын
Hi sir I am a devloper which one I should learn angular or react pls tell me
@NdamuleloNemakh
@NdamuleloNemakh 6 жыл бұрын
Thanks for the video. Can you please include how you would implement this for a list of forbidden values, e.g. Forbidden_list = [ 'admin', 'password', 'vishwas']
@gr8mOmi
@gr8mOmi 5 жыл бұрын
const forbidden = /admin/.test(control.value) || /secondUserName/.test(control.value); this is how ya can add a number of forbiddenNames
@punkkauz
@punkkauz 5 жыл бұрын
userName: ['', [Validators.required, Validators.minLength(3), forbiddenNameValidator(/password/),forbiddenNameValidator(/username/),forbiddenNameValidator(/jukerberg/),forbiddenNameValidator(/mark/)]], it works well brother...
@akramfaiz411
@akramfaiz411 4 жыл бұрын
I guess it won't be used for this scenario, If 'admin' name is already taken it shouldn't allow, but I guess it won't allow 'admin1', 'admin2', 'admin1111' ....
@rukhsarafroz3117
@rukhsarafroz3117 4 жыл бұрын
If we are taking admin it also show error in administration
@neethukevin2619
@neethukevin2619 10 ай бұрын
@@gr8mOmi In the video he already changed the pattern: /admin/.test.... in validator function to a parameter: forbiddenName and wont use the former anymore. Then how can we use it in app class. I think the method userName: ['', [Validators.required, Validators.minLength(3), forbiddenNameValidator(/password/),forbiddenNameValidator(/username/),forbiddenNameValidator(/jukerberg/),forbiddenNameValidator(/mark/)]], only will work
@jahangiralam8206
@jahangiralam8206 5 жыл бұрын
Hey Viswas, First of all thanks for your nobble effort for such a fantastic series. In this video I got a problem. If I set the username minlength: 10, and lets say forbiddenName string is 'password' then if I started typing on the username field it is showing me two consecutive error message as like below: "Username must be at least 10 characterspasswordUsername not allowed" I know this is logically right but I dont wanna show multiple error message at a time. You have used three consecutive *ngIf block for displaying error message for username field. But what if any two of them are true at the same time?? Is there any else if condition to avoid this situation and can you please explain this? Thanks in advance, Jahangir Alam From Bangladesh
@akshaynitin5589
@akshaynitin5589 4 жыл бұрын
try ....same I also faced then issuse is solved.
@devendrajadhav8538
@devendrajadhav8538 4 жыл бұрын
why not directive instead of class even in docs they have mentioned
@greenmarvel6762
@greenmarvel6762 3 жыл бұрын
Super!!!!
@mohammadaljunde9452
@mohammadaljunde9452 4 жыл бұрын
very complex !!
@msh1996
@msh1996 5 жыл бұрын
Best
@muralimanohar2514
@muralimanohar2514 5 жыл бұрын
its hard to understand
@ninistories
@ninistories 5 жыл бұрын
bro
@rjchhetri2370
@rjchhetri2370 4 жыл бұрын
Angular custom form validation is so complex, who would ever like to code like this. It looks nasty
Angular Forms Tutorial - 24 - Cross Field Validation
6:54
Codevolution
Рет қаралды 80 М.
Angular Reactive Forms - All Needed Use Cases
15:55
Monsterlessons Academy
Рет қаралды 35 М.
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 60 МЛН
How to add custom validation with two field in Angular
14:13
CarbonRider
Рет қаралды 7 М.
Reactive Forms in Angular - Dynamic Validation
13:24
Decoded Frontend
Рет қаралды 12 М.
Reactive Form Validation in Angular: Mastering Best Practices
13:08
Monsterlessons Academy
Рет қаралды 8 М.
Forms in Angular - Learning Angular (Part 7)
9:43
Angular
Рет қаралды 53 М.
Reactive Forms  - The Basics
15:48
Fireship
Рет қаралды 257 М.
Angular 19 is a BEAST of a release!
19:39
Maximilian Schwarzmüller
Рет қаралды 49 М.
Angular Crash Course | Learn modern Angular in 90 minutes
1:29:09
Code with Ahsan
Рет қаралды 38 М.