Skip to content

Commit

Permalink
fix: invalid ConfirmationCode validator
Browse files Browse the repository at this point in the history
  • Loading branch information
y9vad9 committed Jun 11, 2023
1 parent 0e33032 commit 182c3d6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public value class ConfirmationCode private constructor(public val string: Strin

override fun create(input: String): Result<ConfirmationCode> {
return when {
input.isBlank() -> Result.failure(CreationFailure.ofBlankValue())
input.isBlank() -> Result.failure(CreationFailure.ofBlank())
input.length != SIZE -> Result.failure(CreationFailure.ofSizeExact(SIZE))
else -> Result.success(ConfirmationCode(input))
}
Expand Down

0 comments on commit 182c3d6

Please sign in to comment.