mirror of
https://github.com/openwrt/luci
synced 2025-01-09 04:28:37 +08:00
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>
This commit is contained in:
parent
361bee37af
commit
1f32729428
@ -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'));
|
||||
|
Loading…
Reference in New Issue
Block a user