File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
model/src/main/kotlin/io/spine/validation/bound Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ import io.spine.protodata.ast.isList
4747import io.spine.protodata.ast.name
4848import io.spine.protodata.ast.qualifiedName
4949import io.spine.protodata.check
50+ import io.spine.validation.RANGE
5051
5152/* *
5253 * Determines whether the field type can be validated with a range-constraining option.
@@ -65,9 +66,12 @@ internal object BoundFieldSupport {
6566 internal fun checkFieldType (field : Field , file : File , option : String ): PrimitiveType {
6667 val primitive = field.type.extractPrimitive()
6768 Compilation .check(primitive in numericPrimitives, file, field.span) {
68- " The field type `${field.type.name} ` of `${field.qualifiedName} ` is not supported by" +
69- " the `($option )` option. Supported field types: numbers and repeated" +
70- " of numbers."
69+ """
70+ The `($option )` option was applied to a filed of unsupported type.
71+ Target field: `${field.qualifiedName} `.
72+ Field type: `${field.type.name} `.
73+ Supported field types: floating-point and integer numbers, repeated of numbers.
74+ """ .trimIndent()
7175 }
7276 return primitive!!
7377 }
You can’t perform that action at this time.
0 commit comments