Class: QgsAbstractMetadataBaseValidator

class qgis.core.QgsAbstractMetadataBaseValidator

Bases: sip.wrapper

Abstract base class for metadata validators.

New in version 3.0: Methods

validate Validates a metadata object, and returns true if the metadata is considered valid.

Signals

Attributes

class ValidationResult(section: str, note: str, identifier: Any = None)

Bases: sip.wrapper

Constructor for ValidationResult.

QgsAbstractMetadataBaseValidator.ValidationResult(QgsAbstractMetadataBaseValidator.ValidationResult)

identifier
note
section
validate(self, metadata: QgsAbstractMetadataBase) → Tuple[bool, object]

Validates a metadata object, and returns true if the metadata is considered valid. If validation fails, the results list will be filled with a list of items describing why the validation failed and what needs to be rectified to fix the metadata.