mirror of
https://github.com/Respect/Validation.git
synced 2024-05-06 00:13:16 +02:00
f9b9dd21f9
Since "sokil/php-isocodes" is a dependency of our repository already, it makes sense to use it as a source of currency codes instead of keeping a list of currencies ourselves. By using that library, we can also validate currency codes using different sets. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
716 B
716 B
CurrencyCode
CurrencyCode()
CurrencyCode(string $set)
Validates an ISO 4217 currency code like GBP or EUR.
v::currencyCode()->validate('GBP'); // true
v::currencyCode('alpha-3')->validate('EUR'); // true
v::currencyCode('numeric')->validate('840'); // true
This rule uses data from sokil/php-isocodes.
Categorization
- ISO codes
- Localization
Changelog
Version | Description |
---|---|
2.2.0 | Allow to use different sets |
2.0.0 | Became case-sensitive |
1.0.0 | Created |
See also: