summaryrefslogtreecommitdiff
path: root/src/value_checker.mli
diff options
context:
space:
mode:
Diffstat (limited to 'src/value_checker.mli')
-rw-r--r--src/value_checker.mli14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/value_checker.mli b/src/value_checker.mli
new file mode 100644
index 0000000..d4ae516
--- /dev/null
+++ b/src/value_checker.mli
@@ -0,0 +1,14 @@
+(*type value_constraint = Regex of string | External of string * string option*)
+
+type value_constraint =
+ | Regex of string [@name "regex"]
+ | External of string * string option [@name "exec"]
+ [@@deriving yojson]
+
+exception Bad_validator of string
+
+val validate_value : string -> Buffer.t -> value_constraint -> string -> bool
+
+val validate_any : string -> value_constraint list -> string -> string option
+
+val validate_all : string -> value_constraint list -> string -> string option