mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-07-11 17:53:58 +03:00
moved length test to util, tests fine
This commit is contained in:
parent
b0780d3bf5
commit
f3d76cf35d
2 changed files with 5 additions and 3 deletions
|
@ -78,8 +78,10 @@ func ValidateCIDR(cidr string) bool {
|
|||
// ValidateCIDRList to validate a list of network CIDR
|
||||
func ValidateCIDRList(cidrs []string) bool {
|
||||
for _, cidr := range cidrs {
|
||||
if ValidateCIDR(cidr) == false {
|
||||
return false
|
||||
if len(cidr) > 0 {
|
||||
if ValidateCIDR(cidr) == false {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue