How can we create a regex pattern that allows letters, numbers, and certain special characters (- and .) while disallowing others?
#Code
private _createModelForm(): FormGroup {
return this.formBuilder.group({
propertyId: this.data.propertyId,
folderName: new FormControl('', [
Validators.required,
Validators.pattern(/^[A-Za-z0-9\-\. ]+$/)
]),
documentManagementFolderId:this.data.documentManagementFolderId
});
}