# Emoji - `Emoji()` Validates if the input is an emoji or a sequence of emojis. ```php v::emoji()->assert('๐Ÿ•'); // Validation passes successfully v::emoji()->assert('๐ŸŽˆ'); // Validation passes successfully v::emoji()->assert('โšก'); // Validation passes successfully v::emoji()->assert('๐ŸŒŠ๐ŸŒŠ๐ŸŒŠ๐ŸŒŠ๐ŸŒŠ๐Ÿ„๐ŸŒŠ๐ŸŒŠ๐ŸŒŠ๐Ÿ–๐ŸŒด'); // Validation passes successfully v::emoji()->assert('๐Ÿ‡ง๐Ÿ‡ท'); // (Country flags) // Validation passes successfully v::emoji()->assert('๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ'); // (ZWJ sequence) // Validation passes successfully v::emoji()->assert('๐Ÿ‘ฉ๐Ÿฝ'); // (Skin tone modifier) // Validation passes successfully v::emoji()->assert('1๏ธโƒฃ'); // (Keycap sequence) // Validation passes successfully v::emoji()->assert('Hello World'); // โ†’ "Hello World" must be an emoji v::emoji()->assert('this is a spark โšก'); // (Mixed content) // โ†’ "this is a spark โšก" must be an emoji ``` This validator supports: - Basic emojis and pictographs - Skin tone modifiers (Fitzpatrick scale) - Country flags (regional indicator sequences) - Subdivision flags (tag sequences like ๐Ÿด๓ ง๓ ข๓ ฅ๓ ฎ๓ ง๓ ฟ) - Keycap sequences (0๏ธโƒฃ-9๏ธโƒฃ, #๏ธโƒฃ, \*๏ธโƒฃ) - ZWJ (Zero Width Joiner) sequences for families, professions, and combined emojis - Emojis up to Unicode 17.0 / Emoji 16.0 ## Templates ### `Emoji::TEMPLATE_STANDARD` | Mode | Template | | ---------: | :------------------------------- | | `default` | {{subject}} must be an emoji | | `inverted` | {{subject}} must not be an emoji | ## Template placeholders | Placeholder | Description | | ----------- | ---------------------------------------------------------------- | | `subject` | The validated input or the custom validator name (if specified). | ## Categorization - Strings ## Changelog | Version | Description | | ------: | :-------------------------------------------------------------------------- | | 3.0.0 | Renamed to `Emoji`, changed the behavior, and added support for more emojis | | 2.0.0 | Created as `NotEmoji` | ## See Also - [Alnum](Alnum.md) - [Alpha](Alpha.md) - [Decimal](Decimal.md) - [Digit](Digit.md)