Skip to content

Commit ab9112a

Browse files
author
yevhenii-nadtochii
committed
Remove the default value for SimpleRule() pseudo-constructor
1 parent d205ea9 commit ab9112a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

model/src/main/kotlin/io/spine/validation/SimpleRules.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public fun SimpleRule(
4646
field: FieldName,
4747
customFeature: Message,
4848
description: String,
49-
errorMessage: String = "",
49+
errorMessage: String,
5050
distribute: Boolean
5151
): SimpleRule {
5252
require(description.isNotBlank())

model/src/main/kotlin/io/spine/validation/ValidatePolicy.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ internal class ValidatePolicy : ValidationPolicy<FieldExited>() {
7171
customFeature = RecursiveValidation.getDefaultInstance(),
7272
description = "A message field is validated by its validation rules. " +
7373
"If the field is invalid, the container message is invalid as well.",
74+
errorMessage = "", // `(validate)` doesn't create an error on its own.
7475
distribute = true
7576
)
7677
return simpleRuleAdded {

0 commit comments

Comments
 (0)