StructuredDataValidator class

Utility class for validating and cleaning structured data

Constructors

StructuredDataValidator.new({Logger? logger, ContentValidator? contentValidator, List<String> requiredFields = const []})
Creates a new StructuredDataValidator with the given parameters

Properties

contentValidator ContentValidator
Content validator for validating individual fields
final
hashCode int
The hash code for this object.
no setterinherited
logger Logger?
Logger for logging structured data operations
final
requiredFields List<String>
Required fields that must be present and non-empty
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cleanStructuredData(Map<String, String> data) Map<String, String>
Cleans a single structured data item
cleanStructuredDataList(List<Map<String, String>> dataList) List<Map<String, String>>
Cleans a list of structured data items
filterValidItems(List<Map<String, String>> dataList) List<Map<String, String>>
Filters out invalid items from a list of structured data items
normalizeFieldNames(Map<String, String> data, {Map<String, String>? fieldMappings}) Map<String, String>
Normalizes field names in structured data
normalizeFieldNamesList(List<Map<String, String>> dataList, {Map<String, String>? fieldMappings}) List<Map<String, String>>
Normalizes field names in a list of structured data items
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
validateStructuredData(Map<String, String> data) StructuredDataValidationResult
Validates a single structured data item
validateStructuredDataList(List<Map<String, String>> dataList) List<StructuredDataValidationResult>
Validates a list of structured data items

Operators

operator ==(Object other) bool
The equality operator.
inherited