Skip to content

MinItems

class MinItems(val size: Int, factory: BsonFactory) : Schema.SimpleConstraint<Collection<*>> 

The minimum number of items in an array (inclusive).

If the property does not contain an array, this constraint is ignored.

Constructors

MinItems

constructor(size: Int, factory: BsonFactory)

Properties

name

val name: String

The name of this constraint.

size

val size: Int

Functions

toString

override fun toString(): String

JSON representation of this constraint object.

writeTo

override fun writeTo(writer: BsonFieldWriter)

Writes this object to the provided writer.