Annotation Type Validation

    • Element Detail

      • value

        String value
        Returns:
        the query used to validate documents in a collection. This query is not validated so care must be taken to ensure document field names and types are correct.
        MongoDB documentation
        core/document-validation/
      • level

        ValidationLevel level
        Returns:
        how strictly MongoDB should apply the validation rules to existing documents during an insert or update.
        See Also:
        ValidationLevel
        Default:
        com.mongodb.client.model.ValidationLevel.STRICT
      • action

        ValidationAction action
        Returns:
        how strictly MongoDB should apply the validation rules to existing documents during an insert or update.
        See Also:
        ValidationAction
        Default:
        com.mongodb.client.model.ValidationAction.ERROR