Skip to content

DependOnProperties

To be valid, a property requires, when it is present, that other properties are present as well.

For example, if a property "send_email_notifications" depends on the property "email", validation fails if the "send_email_notifications" field is present but "email" is not.

This relationship is monodirectional: if "send_email_notifications" is not present, then "email" is allowed to be absent.

This dependency can be seen as a conditional Required constraint.

Constructors

DependOnProperties

constructor(properties: List<String>, factory: BsonFactory)

Properties

properties

Functions

toString

open override fun toString(): String

JSON representation of this object.

writeTo

@LowLevelApi
open override fun writeTo(writer: BsonValueWriter)

Writes this object to the provided writer.