Skip to content

Commit

Permalink
Move Constraint to its own file (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhoepelman authored Nov 9, 2024
1 parent b9efceb commit b8627a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 7 additions & 0 deletions src/commonMain/kotlin/io/konform/validation/Constraint.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package io.konform.validation

public class Constraint<in R> internal constructor(
public val hint: String,
public val templateValues: List<String>,
public val test: (R) -> Boolean,
)
6 changes: 0 additions & 6 deletions src/commonMain/kotlin/io/konform/validation/Validation.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,3 @@ public interface Validation<in T> {

public operator fun invoke(value: T): ValidationResult<@UnsafeVariance T> = validate(value)
}

public class Constraint<in R> internal constructor(
public val hint: String,
public val templateValues: List<String>,
public val test: (R) -> Boolean,
)

0 comments on commit b8627a1

Please sign in to comment.