Updating validation
This commit is contained in:
parent
54b75d7dc1
commit
dd5415cb20
@ -76,7 +76,7 @@
|
||||
}
|
||||
|
||||
function onLearn() {
|
||||
var keyword = prompt('Input keyword to learn as (alphanumeric, no spaces)');
|
||||
var keyword = prompt('Learn keyword as');
|
||||
if (keyword === null) {
|
||||
return;
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ function loadDb(params) {
|
||||
}
|
||||
|
||||
function addKeyword(query, callback) {
|
||||
if (!/^[a-zA-Z0-9]+$/.test(query.keyword)) {
|
||||
if (!/^[a-zA-Z0-9\s\-]+$/.test(query.keyword)) {
|
||||
callback({ keyword: query.keyword, success: false });
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user