projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f4c39dd
)
luci-base: cbi.js: add client-side hexstring datatype validator
author
Jo-Philipp Wich
<jo@mein.io>
Mon, 5 Nov 2018 10:13:39 +0000
(11:13 +0100)
committer
Jo-Philipp Wich
<jo@mein.io>
Mon, 5 Nov 2018 10:13:39 +0000
(11:13 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/htdocs/luci-static/resources/cbi.js
patch
|
blob
|
history
diff --git
a/modules/luci-base/htdocs/luci-static/resources/cbi.js
b/modules/luci-base/htdocs/luci-static/resources/cbi.js
index d9b9baf7be9f500c6209cd72a491d8ebaf1626b7..1c2b14df6985cc80996023604dae127e087d096b 100644
(file)
--- a/
modules/luci-base/htdocs/luci-static/resources/cbi.js
+++ b/
modules/luci-base/htdocs/luci-static/resources/cbi.js
@@
-582,6
+582,11
@@
var CBIValidatorPrototype = {
return this.apply(subvalidator, undefined, subargs);
return this.assert(true);
+ },
+
+ hexstring: function() {
+ return this.assert(this.value.match(/^([a-f0-9][a-f0-9]|[A-F0-9][A-F0-9])+$/),
+ _('hexadecimal encoded value'));
}
}
};