When I looked into the implementation of java.util.UUID.fromString, I found that it doesn\'t check for the UUID length. Is there any particular reason for this?
java.util.UUID.fromString
A copy of ams's answer but for scala xD
def isValidUuid(uuid: String): Boolean = try uuid != null && UUID.fromString(uuid).toString.equals(uuid) catch { case e: IllegalArgumentException => false }