Hi all,
I want allow special characters into my field “title” but not " ’ ; + ; = ; - ", only characters with accents like " é ; à ; è ; ê ; ï ", …
My code actually (it work)
.ts :
this.annonce_form = new FormGroup({
title: new FormControl('', Validators.compose([
Validators.maxLength(25),
Validators.minLength(5),
Validators.required,
Validators.pattern('^(?=.*[a-zA-Z])[a-zA-Z0-9]+$'), // <-- Allow letters and numbers only
])),
})
Ty !