Add uuid format check
@@ -136,6 +136,10 @@ public class StringDSL {
}
}
+ public static boolean isUuid(String uuid) {
+ return uuid != null && uuid.toLowerCase().matches("[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}");
+ }
+
public static boolean isZStackUuid(String uuid) {
return uuid != null && uuid.matches("[0-9a-f]{8}[0-9a-f]{4}[1-5][0-9a-f]{3}[89ab][0-9a-f]{3}[0-9a-f]{12}");
}
