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
@EduShaman2 жыл бұрын
For a newbie this was a pretty quick drive through factory functions . Especislly while understanding how the control transfers .
@bunthaideng24926 жыл бұрын
OMG! This is very complex.
@shamshtabrez64926 жыл бұрын
Your video helped me to learn custom validations. You are one of the best tutors on youtube.
@chaitanyayash29582 жыл бұрын
This particular video in particular is superb.
@user-rp9iis1en6h3 жыл бұрын
thanks a lot. This tutorial is so easy to understand. I would like to suggest everyone to go through sequentially.
@ABsazerNer4 жыл бұрын
This is the best validation function I've ever had, thank you so much
@amanraj36465 жыл бұрын
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?
@jamuna51813 жыл бұрын
Although complex but your explanation makes it easy to understand :)
@thehulk26422 жыл бұрын
thanks. 🙂 very easy to understand . step by step. it goes into mind.
@renanrosa55272 жыл бұрын
Thanks. It worked just fine.
@khurrammazhar93514 жыл бұрын
You are truly a genius
@lavanyaverma77393 жыл бұрын
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/)
@naimeahmed11923 жыл бұрын
Very well explained. Thank you guru
@rahulg1255 жыл бұрын
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?
@manikmahashabde29463 жыл бұрын
Very helpful 👍 thanks a lot 🙂
@vishtrinity5 жыл бұрын
why are we not sending the parameter of type control in the forbiddenNameValidator function at 4:23
@happyhandsome20812 жыл бұрын
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.
@ridloalimudin1405 жыл бұрын
i love the way you teach. do it more...... Thanks
@sarwatafroz93214 жыл бұрын
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
@oswaldosilva77505 жыл бұрын
great way to explain. Thanks for sharing
@user-jtwe1xrf2n3 жыл бұрын
Thank you very much!
@rahulkathar3643 жыл бұрын
Can we create multiple validatorFn functions?
@laiparekh71142 жыл бұрын
Didn't understand the stuff you did in app.compnent.ts file. Can anyone please explain
@pravinmisra3 жыл бұрын
How can we restrict multiple words for userName field?
@bichitranandamalik79134 жыл бұрын
Hi sir I am a devloper which one I should learn angular or react pls tell me
@NdamuleloNemakh6 жыл бұрын
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']
@gr8mOmi5 жыл бұрын
const forbidden = /admin/.test(control.value) || /secondUserName/.test(control.value); this is how ya can add a number of forbiddenNames
@punkkauz5 жыл бұрын
userName: ['', [Validators.required, Validators.minLength(3), forbiddenNameValidator(/password/),forbiddenNameValidator(/username/),forbiddenNameValidator(/jukerberg/),forbiddenNameValidator(/mark/)]], it works well brother...
@akramfaiz4114 жыл бұрын
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' ....
@rukhsarafroz31174 жыл бұрын
If we are taking admin it also show error in administration
@neethukevin261910 ай бұрын
@@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
@jahangiralam82065 жыл бұрын
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
@akshaynitin55894 жыл бұрын
try ....same I also faced then issuse is solved.
@devendrajadhav85384 жыл бұрын
why not directive instead of class even in docs they have mentioned
@greenmarvel67623 жыл бұрын
Super!!!!
@mohammadaljunde94524 жыл бұрын
very complex !!
@msh19965 жыл бұрын
Best
@muralimanohar25145 жыл бұрын
its hard to understand
@ninistories5 жыл бұрын
bro
@rjchhetri23704 жыл бұрын
Angular custom form validation is so complex, who would ever like to code like this. It looks nasty