diff options
author | Paul Donald <newtwen+github@gmail.com> | 2024-10-22 22:33:00 +0200 |
---|---|---|
committer | Paul Donald <newtwen+github@gmail.com> | 2024-10-22 23:48:38 +0200 |
commit | 1f32729428b4a859399c03efd255d7ae61a7b2b8 (patch) | |
tree | 7f2950e5d708cc220c5399ea3c916aca355ffad1 /modules/luci-base | |
parent | 361bee37afac1df8eaad306d2bd6670dc79273a1 (diff) |
luci-base: allow terminal '.' in hostname checks
allowed in hostnames to represent the root of the DNS hierarchy
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Diffstat (limited to 'modules/luci-base')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/validation.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/validation.js b/modules/luci-base/htdocs/luci-static/resources/validation.js index 5719031cb7..87f5f4b42c 100644 --- a/modules/luci-base/htdocs/luci-static/resources/validation.js +++ b/modules/luci-base/htdocs/luci-static/resources/validation.js @@ -394,7 +394,7 @@ var ValidatorFactory = baseclass.extend({ if (this.value.length <= 253) return this.assert( (this.value.match(/^[a-zA-Z0-9_]+$/) != null || - (this.value.match(/^[a-zA-Z0-9_][a-zA-Z0-9_\-.]*[a-zA-Z0-9]$/) && + (this.value.match(/^[a-zA-Z0-9_][a-zA-Z0-9_\-.]*[a-zA-Z0-9]\.?$/) && this.value.match(/[^0-9.]/))) && (!strict || !this.value.match(/^_/)), _('valid hostname')); |