From 1459c77aafa615a0c7b997896889d0fcfff49453 Mon Sep 17 00:00:00 2001 From: Pieter Edelman Date: Thu, 20 Jun 2024 15:56:46 +0200 Subject: [PATCH] Issue #1658: recognize that mimetype subtypes can contain dashes --- .../org/hl7/fhir/validation/instance/InstanceValidator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java index a7a3eeeab1..f55338e325 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java @@ -3552,7 +3552,7 @@ private String checkValidUrl(String value) { } private String checkValidMimeType(String mt) { - if (!mt.matches("^(\\w+|\\*)\\/(\\w+|\\*)((;\\s*(\\w+)=\\s*(\\S+))?)$")) { + if (!mt.matches("^(\\w+|\\*)\\/([\\w-]+|\\*)((;\\s*(\\w+)=\\s*(\\S+))?)$")) { return "Mime type invalid"; } return null;