Copied!

ValidationPolicyResolverInterface

ValidationPolicyResolverInterface.php : 27
Interface

Resolves which validation profile should be used for a translation provider.

A validation profile is a reusable validator contract selected by provider service tags, not a validator dedicated to a single provider identifier. This lets several providers share the same validation rules. For example, OpenAI and other AI-backed providers can point to the same "ai_generic" profile instead of each provider registering its own validator with duplicated limits and language-code patterns.

The provider-to-profile mapping is collected during container compilation from the "validation_profile" attribute on translation provider service tags.

Methods

publicresolve()

ValidationPolicyResolverInterface.php : 32
public resolve(TranslationProviderInterface $provider) : string

Parameters

Name Type Default value Description
$provider TranslationProviderInterface - -

Return values

string

Tags
Throws
ValidatorNotFoundException