hsuanxyz/ionic-tags-input

unable to use other variables and functions in verify method

Opened this issue · 2 comments

verifyTag(str: string): boolean{ **this.taggedUser(str);** return str !== 'ABC' && str.trim() !== ''; }

Can you please further explain your issue?

I am facing the same issue.. the exact issue is that inside the verifyTag method, we cannot access any other class property or method, which are defined outside its scope.
verifyTag(str: string): boolean{
var patt = /^[0-9]{10,12}$/;
var validity = patt.test(str);
if(validity){
this.testValildate.emailError = false }
else{
this.testValildate.emailError = true
}
return validity;
}

Here, this.testValildate is undefined.

Any solution?