git.99rst.org
/
openwrt-luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
464c659
)
luci-base: use correct regex for time validation
author
Daniel Nilsson
<redacted>
Sat, 2 Mar 2024 10:35:04 +0000
(11:35 +0100)
committer
Paul Donald
<redacted>
Thu, 7 Mar 2024 18:52:22 +0000
(19:52 +0100)
Before this change, values further in time than 23:59:59 was allowed, such as 24:00:00 and 23:60:00. Leap seconds is accounted for so 60 is allowed in the seconds parameter.
Signed-off-by: Daniel Nilsson <redacted>
modules/luci-base/htdocs/luci-static/resources/validation.js
patch
|
blob
|
history
diff --git
a/modules/luci-base/htdocs/luci-static/resources/validation.js
b/modules/luci-base/htdocs/luci-static/resources/validation.js
index e4f8c7a2019e94480aab89dadbdb7929d2ad8325..5719031cb7475dde4b1a73def0602c46ece0949e 100644
(file)
--- a/
modules/luci-base/htdocs/luci-static/resources/validation.js
+++ b/
modules/luci-base/htdocs/luci-static/resources/validation.js
@@
-563,7
+563,7
@@
var ValidatorFactory = baseclass.extend({
},
timehhmmss: function() {
- return this.assert(this.value.match(/^
[0-6][0-9]:[0-6][0-9]:[0-6][0-9]
$/),
+ return this.assert(this.value.match(/^
(?:[01]\d|2[0-3]):[0-5]\d:(?:[0-5]\d|60)
$/),
_('valid time (HH:MM:SS)'));
},
git clone https://git.99rst.org/PROJECT