Answer the question
In order to leave comments, you need to log in
How to create a validator that checks the beginning of a link?
Hello, the task is to create an input in which a link to an image is entered. How to create a validator that checks the beginning of a link for http:// ? Everything is written through reactive forms. Please tell me how..
addressIcon: new FormControl('', [Validators.required, Validators.(Что тут должно быть??) ]),
Answer the question
In order to leave comments, you need to log in
addressIcon: new FormControl('', [Validators.required, Validators.pattern('https?:\/\/(www\.)?[[email protected]:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)') ]),
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question