summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/validate_value.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/validate_value.ml b/src/validate_value.ml
index 32d34de..05d62b1 100644
--- a/src/validate_value.ml
+++ b/src/validate_value.ml
@@ -12,7 +12,7 @@ let rec validate_value buf value_constraint value =
| Group l ->
List.for_all (fun c -> validate_value buf c value) l
| Regex s ->
- (try let _ = Pcre.exec ~pat:s value in true
+ (try let _ = Pcre.exec ~pat:(Printf.sprintf "^%s$" s) value in true
with Not_found -> false)
| Exec c ->
(* XXX: Unix.open_process_in is "shelling out", which is a bad idea on multiple levels,