1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-14 00:15:45 +01:00

Better option validation messages for the more confusing validators.

This commit is contained in:
Kris Maglione
2010-09-28 17:06:46 -04:00
parent 50c1c568a2
commit c2c33b77fb
3 changed files with 18 additions and 5 deletions

View File

@@ -1072,7 +1072,8 @@ const Hints = Module("hints", {
["asdfg;lkjh", "Home Row"]],
validator: function (value) {
let values = events.fromString(value).map(events.closure.toString);
return array.uniq(values).length === values.length;
return Option.validIf(array.uniq(values).length === values.length,
"Duplicate keys not allowed")
}
});