Skip to content

Pattern

class Pattern(@Language(value = "JSRegexp") val pattern: String, factory: BsonFactory) : Schema.SimpleConstraint<String> 

This property must have a value that matches the regular expression pattern, in the ECMA 262 dialect.

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

Constructors

Pattern

constructor(@Language(value = "JSRegexp") pattern: String, factory: BsonFactory)

Properties

name

val name: String

The name of this constraint.

pattern

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.