diff options
author | Devaev Maxim <[email protected]> | 2020-09-08 10:41:28 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-09-08 10:44:38 +0300 |
commit | 1ea68f3e9aa2f7034e0d67e8ec90c7bc3fbd95e3 (patch) | |
tree | 468cf64ccdb987983b258db99638928d83cb4fd6 /kvmd/validators | |
parent | 7990bf7e54fe7655816700701524a62787956b27 (diff) |
more validation
Diffstat (limited to 'kvmd/validators')
-rw-r--r-- | kvmd/validators/kvm.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kvmd/validators/kvm.py b/kvmd/validators/kvm.py index 0f0e68cf..fe9a8a8e 100644 --- a/kvmd/validators/kvm.py +++ b/kvmd/validators/kvm.py @@ -91,6 +91,10 @@ def valid_hid_mouse_wheel(arg: Any) -> int: # ===== +def valid_ugpio_driver(arg: Any) -> str: + return check_re_match(arg, "GPIO driver", r"^[a-zA-Z_][a-zA-Z0-9_-]*$")[:255] + + def valid_ugpio_mode(arg: Any) -> str: return check_string_in_list(arg, "GPIO mode", ["input", "output"]) |