I tried this code as provided in https://v2.vuejs.org/v2/cookbook/form-validation.html.
validEmail: function (email) {
var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return re.test(email);
}
Vuejs is saying that - error: Unnecessary escape character: \[ (no-useless-escape) at src/components/form.vue:125:65 which is the line var re = ...
What I am getting wrong here? I called this function like this.validEmail(this.modelname)