respect-validation/docs/rules/Charset.md
Henrique Moody 10df3211f5
Add "Categorization" section to rule documentations
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
2019-05-11 19:16:21 +02:00

567 B

Charset

  • Charset(string ...$charset)

Validates if a string is in a specific charset.

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: