ContentValidator class
Utility class for validating and cleaning extracted content
Constructors
- ContentValidator.new({Logger? logger, int minContentLength = 1, int maxContentLength = 100000, bool cleanHtmlTags = true, bool normalizeWhitespace = true, bool trimContent = true})
- Creates a new ContentValidator with the given parameters
Properties
- cleanHtmlTags → bool
-
Whether to clean HTML tags from content
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- logger → Logger?
-
Logger for logging content operations
final
- maxContentLength → int
-
Maximum content length to be considered valid
final
- minContentLength → int
-
Minimum content length to be considered valid
final
- normalizeWhitespace → bool
-
Whether to normalize whitespace in content
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- trimContent → bool
-
Whether to trim content
final
Methods
-
cleanContent(
String content) → String - Cleans a single content string
-
cleanContentList(
List< String> contentList) → List<String> - Cleans a list of content strings
-
cleanContentMap(
Map< String, String> contentMap) → Map<String, String> - Cleans a map of content strings
-
cleanContentMapList(
List< Map< contentMapList) → List<String, String> >Map< String, String> > - Cleans a list of maps of content strings
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validateContent(
String content) → ContentValidationResult - Validates a single content string
-
validateContentList(
List< String> contentList) → List<ContentValidationResult> - Validates a list of content strings
-
validateContentMap(
Map< String, String> contentMap) → Map<String, ContentValidationResult> - Validates a map of content strings
-
validateContentMapList(
List< Map< contentMapList) → List<String, String> >Map< String, ContentValidationResult> > - Validates a list of maps of content strings
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited