summaryrefslogtreecommitdiff
path: root/kvmd/validators
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2021-07-27 05:25:54 +0300
committerMaxim Devaev <[email protected]>2021-07-27 05:25:54 +0300
commit6b07a80834879970639b651b1a225f8d1f5f7c2e (patch)
tree51f5c91b3b384852ff5c8558b097c02f7a5fd120 /kvmd/validators
parent3c421fa94cbd1e479a51d66eaa4fb33d74277009 (diff)
/msd/write_remote handle
Diffstat (limited to 'kvmd/validators')
-rw-r--r--kvmd/validators/net.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/kvmd/validators/net.py b/kvmd/validators/net.py
index 991540bd..c45b3aed 100644
--- a/kvmd/validators/net.py
+++ b/kvmd/validators/net.py
@@ -116,3 +116,8 @@ def valid_ssl_ciphers(arg: Any) -> str:
except Exception as err:
raise ValidatorError(f"The argument {arg!r} is not a valid {name}: {err}")
return arg
+
+
+def valid_url(arg: Any) -> str:
+ # XXX: VERY primitive
+ return check_re_match(arg, "HTTP(S) URL", r"^https?://[\[\w]+\S*")