0👍
You can change pattern.test(e.target.value) to e.key.match(pattern)
validateLinuxPath() {
let pattern = /^\/$|(\/[a-zA-Z_0-9-]+)+$/;
let res = event.key.match(pattern);
if (!res) {
event.preventDefault();
return false;
}
}
- [Vuejs]-How to make selectable items
- [Vuejs]-Problem with configuring virtual host for single page vuejs app
Source:stackexchange.com