diff --git a/zio-schema/shared/src/main/scala/zio/schema/Schema.scala b/zio-schema/shared/src/main/scala/zio/schema/Schema.scala index 228e61d20..59a0f617f 100644 --- a/zio-schema/shared/src/main/scala/zio/schema/Schema.scala +++ b/zio-schema/shared/src/main/scala/zio/schema/Schema.scala @@ -156,6 +156,8 @@ sealed trait Schema[A] { def validate(value: A)(implicit schema: Schema[A]): Chunk[ValidationError] = Schema.validate[A](value) + def validation(validation: Validation[A]): Schema[A] = annotate(zio.schema.annotation.validate(validation)) + /** * Returns a new schema that combines this schema and the specified schema together, modeling * their tuple composition.