aeat.application.user_profile._validation module

Schema-driven validation service for user-profile lifecycle commands.

ProfileValidationService validates a UserProfileRecord against a loaded schema definition and returns structured ProfileValidationIssue entries for every constraint violation.

class ProfileValidationService(*, schema)[source]

Bases: object

Validate a profile record against a loaded schema.

Stateless. Constructed with a loaded ProfileSchemaDefinition so the same instance can validate many records or commands.

Parameters:

schema (ProfileSchemaDefinition)

property schema: ProfileSchemaDefinition
validate_record(record)[source]

Validate every fact on a profile against the schema.

Parameters:

record (UserProfileRecord) – The UserProfileRecord whose facts are validated.

Return type:

ProfileValidationReport

Returns a ProfileValidationReport.

validate_facts(profile_id, facts)[source]

Validate a free-standing collection of facts.

Returns a ProfileValidationReport.

Return type:

ProfileValidationReport

Parameters: