Skip to main content

Module field_validator

Module field_validator 

Source
Expand description

Key-value validation for configuration service.

This module handles the validation logic that was previously embedded in ProductionConfigService::validate_and_set_value. It provides field-specific validation for configuration keys and values.

§Architecture

Functions§

get_field_description
Get a user-friendly description for a configuration field.
normalize_ai_provider
Normalize an ai.provider value to its canonical form.
validate_all_fields
Validate every field of a fully-deserialized Config using the same per-key rules as validate_field. This is used by ConfigService::load_for_repair so that a TOML-parsed but strict-invalid config still has its individual field invariants enforced before being handed to the config set/get/list handlers.
validate_field
Validate and parse a configuration field based on its key.