Skip to content

Commit

Permalink
Fixing regex for UUID validator (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kapil Rastogi authored Jun 29, 2020
1 parent eaebb14 commit 146bb4e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* Class to validate a UUID value
*/
public class UUIDValidator {
private static final String UUID_PATTERN = "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}";
private static final String UUID_PATTERN = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";

public static boolean isValidUUID(String uuid) {
Validate.notNull(uuid, "The uuid cannot be null");
Expand Down

0 comments on commit 146bb4e

Please sign in to comment.