validate
fun ProviderConfigurationState.validate(apiKeyRequired: Boolean = true): Map<ProviderConfigurationField, ProviderConfigurationError>
Validates every field and returns the first problem found per field; an empty map means valid.
All fields are required except ProviderConfigurationState.apiKey when apiKeyRequired is false. ProviderConfigurationState.baseUrl must be an absolute http or https URL with a valid host name, IPv4 address, or bracketed IPv6 address and, if present, a port from 1 to 65535. Surrounding whitespace is ignored.