Skip to content

MinLength

class MinLength(val length: Int, factory: BsonFactory) : Schema.SimpleConstraint<String> 

This property must have a value with a length greater than or equal to length.

If the property does not contain a string, this constraint is ignored.

Constructors

MinLength

constructor(length: Int, factory: BsonFactory)

Properties

length

val length: Int

name

val name: String

The name of this constraint.

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.