mirror of
https://github.com/Respect/Validation.git
synced 2024-06-04 14:52:17 +02:00
10df3211f5
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
32 lines
567 B
Markdown
32 lines
567 B
Markdown
# Charset
|
|
|
|
- `Charset(string ...$charset)`
|
|
|
|
Validates if a string is in a specific charset.
|
|
|
|
```php
|
|
v::charset('ASCII')->validate('açúcar'); // false
|
|
v::charset('ASCII')->validate('sugar'); //true
|
|
v::charset('ISO-8859-1', 'EUC-JP')->validate('日本国'); // true
|
|
```
|
|
|
|
The array format is a logic OR, not AND.
|
|
|
|
## Categorization
|
|
|
|
- Strings
|
|
|
|
## Changelog
|
|
|
|
Version | Description
|
|
--------|-------------
|
|
2.0.0 | Charset supports multiple charsets on its constructor
|
|
0.5.0 | Created
|
|
|
|
***
|
|
See also:
|
|
|
|
- [Alnum](Alnum.md)
|
|
- [Alpha](Alpha.md)
|
|
- [PhpLabel](PhpLabel.md)
|