RemoteMetadataValidator class

Second security boundary for remote registry data.

RemoteMetadataValidator validates every RemoteTemplateRecord produced by RegistryResponseParser before it is admitted into the catalog. Validation is strict and fail-closed: any unexpected or malformed field causes the record to be rejected, not silently coerced.

What is validated

  • ID: matches ^[a-z][a-z0-9_]{0,63}$
  • Version: parseable by TemplateSemVer
  • displayName / description: non-empty, bounded length
  • projectType: in allowedProjectTypes
  • category: in allowedRemoteCategories (remote cannot claim builtin)
  • maturity: in allowedMaturityValues (if present)
  • tags / capabilities: each element matches ^[a-z][a-z0-9_-]{0,63}$
  • documentationUrl: if present, must be an HTTPS URL
  • downloadCount / rating: numeric bounds
  • dependencies: each element is a valid ID
  • minimumDartSdk: non-empty string (syntactic check only)

Constructors

RemoteMetadataValidator()
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
validate(RemoteTemplateRecord record) → MetadataValidationResult
Validates record and returns a MetadataValidationResult.
validateAll(List<RemoteTemplateRecord> records, {void onRejected(RemoteTemplateRecord record, String reason)?}) → List<RemoteTemplateRecord>
Validates a list of records, returning only those that pass.

Operators

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