diff --git a/daffodil-core/src/main/scala/org/apache/daffodil/core/dsom/ElementBase.scala b/daffodil-core/src/main/scala/org/apache/daffodil/core/dsom/ElementBase.scala index bda6adb605..45d1566e9d 100644 --- a/daffodil-core/src/main/scala/org/apache/daffodil/core/dsom/ElementBase.scala +++ b/daffodil-core/src/main/scala/org/apache/daffodil/core/dsom/ElementBase.scala @@ -966,7 +966,7 @@ trait ElementBase Assert.invariant(hasLength) schemaDefinitionUnless( isSimpleType, - "Facet length is allowed only on types string and hexBinary.", + "Facet length is allowed only on simple types or types derived from simple types.", ) typeDef match { case _ if hasRepType => { @@ -1037,7 +1037,7 @@ trait ElementBase private def computeMinMaxLength: (java.math.BigDecimal, java.math.BigDecimal) = { schemaDefinitionUnless( isSimpleType, - "Facets minLength and maxLength are allowed only on types string and hexBinary.", + "Facets minLength and maxLength are allowed only on simple types or types derived from simple types.", ) typeDef match { case _ if hasRepType => { diff --git a/daffodil-test/src/test/resources/org/apache/daffodil/section02/validation_errors/Validation.tdml b/daffodil-test/src/test/resources/org/apache/daffodil/section02/validation_errors/Validation.tdml index 3204a59e69..65945e4189 100644 --- a/daffodil-test/src/test/resources/org/apache/daffodil/section02/validation_errors/Validation.tdml +++ b/daffodil-test/src/test/resources/org/apache/daffodil/section02/validation_errors/Validation.tdml @@ -442,6 +442,14 @@ + + + + + + + + @@ -710,6 +718,30 @@ + + + + + deadbeefdafada + + + + + DEADBEEFDAFADA + + + + + + e2_8 + failed facet checks + facet length (0) + + +