Build the frozen CountryDefinition for a country module.
source is a class with static methods, a plain object bundling module-level
functions, or a CountryValidator built by createValidator or
createCompositeValidator. A module's methods are wrapped so they can be called
detached from their class; a built validator is used as-is (#183).
The definition, its aliases, and its validator are frozen, so a definition cannot
swap the functions the registry calls. The validator's METADATA is the module's
own object and stays mutable; getCountryIdFormat() returns a copy of it.
Build the frozen
CountryDefinitionfor a country module.sourceis a class with static methods, a plain object bundling module-level functions, or aCountryValidatorbuilt bycreateValidatororcreateCompositeValidator. A module's methods are wrapped so they can be called detached from their class; a built validator is used as-is (#183).The definition, its aliases, and its validator are frozen, so a definition cannot swap the functions the registry calls. The validator's
METADATAis the module's own object and stays mutable;getCountryIdFormat()returns a copy of it.