diff --git a/src/commonMain/kotlin/kotools/types/text/NotBlankString.kt b/src/commonMain/kotlin/kotools/types/text/NotBlankString.kt index 673b55d08..d95694905 100644 --- a/src/commonMain/kotlin/kotools/types/text/NotBlankString.kt +++ b/src/commonMain/kotlin/kotools/types/text/NotBlankString.kt @@ -70,7 +70,8 @@ public value class NotBlankString private constructor( @JvmSynthetic public fun create(value: Any?): NotBlankString { val text: String = value.toString() - require(text.isNotBlank()) { ErrorMessage.blankString } + val isValid: Boolean = text.isNotBlank() + require(isValid) { ErrorMessage.blankString } return NotBlankString(text) }