org.springframework.data.mongodb.core.validation

Interface Validator

    • Method Detail

      • toDocument

        org.bson.Document toDocument()
        Get the Document containing the validation specific rules. The document may contain fields that may require type and/or field name mapping.
        Returns:
        a MongoDB validator Document. Never null.
      • document

        static Validator document(org.bson.Document validationRules)
        Creates a basic Validator checking documents against a given set of rules.
        Parameters:
        validationRules - must not be null.
        Returns:
        new instance of Validator.
        Throws:
        IllegalArgumentException - if validationRules is null.