summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs/luci-static/resources/validation.js
AgeCommit message (Collapse)Author
2021-11-18Merge pull request #5442 from lvoegl/validation-error-popup-messageJo-Philipp Wich
luci-base: show validation message in save error
2021-10-28luci-base: add legacy directory, file and device validator JS stubsJo-Philipp Wich
Fixes: #5466 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-10-26luci-base: show validation message in errorLukas Voegl
Signed-off-by: Lukas Voegl <lvoegl@tdt.de>
2021-07-03luci-base: validation: disallow mutlicast MACs by defaultJo-Philipp Wich
Extend the MAC address validator to disallow multicast MAC addresses and add a new optional validator option to require multicast MACs instead of unicast ones. Fixes: #5166 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-05-31luci-base: fix `network` data type validationJo-Philipp Wich
Fixes: #5085 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-01luci-base: validation.js: optionally support negative prefixesJo-Philipp Wich
Support negative prefix length in the `cidr`, `cidr4`, `cidr6`, `ipmask`, `ipmask4` and `ipmask6` data types when an optional truish flag is passed to the datatype name. Ref: #4812 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-05-19Merge pull request #4053 from TDT-AG/pr/20200515-luci-baseFlorian Eckert
luci-base: fix host validation function
2020-05-19luci-base: fix host validation functionFlorian Eckert
Allow only ipv4 or ipv6 addresses without IP mask. A host IP with mask does not make sense in this context. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-05-17luci-base: validation.js: count byte- instead of character length of stringsJo-Philipp Wich
Fixes: #4055 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-02luci-base: harmonize JS class naming and requestingJo-Philipp Wich
- Make builtin classes available via `require` to allow view code to request external and internal classes in a consistent manner without having to know which classes are builtin and which not - Make base classes request any used class explicitely instead of relying on implicitly set up L.{dom,view,Poll,Request,Class} aliases - Consistently convert class names to lower case in JSdoc to match the names used in `require` statements - Deprecate L.{dom,view,Poll,Request,Class} aliases Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-31luci-base: validation.js: fix integer and float type validationJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-22luci-base: validation.js: fix "unique" validatorJo-Philipp Wich
Previous refactoring renamed the "data-type" attribute of widget markup containers to "data-widget", breaking the "unique" validator as it relies on it to lookup options. Fixes: #3341 Fixes: 13e9e3e9e ("treewide: fix "Unhandled token" errors with Lua CBI maps") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-11luci-base: validation.js: implement length() datatype validatorJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-11luci-base: validation.js: fix nested function declarationsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: validation.js: rework translation labelsJo-Philipp Wich
Rework validation error translations for compount operators such as list() or neg() to not rely that much on specific native language grammar. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07luci-base: split off CBI validations into separate classJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>