mirror of
https://github.com/Respect/Validation.git
synced 2026-03-16 07:15:45 +01:00
The data in this commit has been gathered, scrapped, organized and treated based on the Emoji Unicode V11 specification [1]. [1]: https://unicode.org/Public/emoji/11.0/emoji-test.txt Co-authored-by: Henrique Moody <henriquemoody@gmail.com>
1 KiB
1 KiB
NotEmoji
v::notEmoji()
Validates if the input does not contain an emoji.
v::notEmoji()->validate('Hello World, without emoji'); // true
v::notEmoji()->validate('🍕'); // false
v::notEmoji()->validate('🎈'); // false
v::notEmoji()->validate('⚡'); // false
v::notEmoji()->validate('this is a spark ⚡'); // false
v::notEmoji()->validate('🌊🌊🌊🌊🌊🏄🌊🌊🌊🏖🌴'); // false
Please consider that the performance of this validator is linear which means the longer the text the longer it takes to perform the check. However, the validator will break the execution as soon as it finds the first emoji or until it checks the whole text.
Note: this validator will check the Emoji as they are defined in Unicode V11 check the following link for more details Unicode v11
Changelog
| Version | Description |
|---|---|
| 2.0.0 | Created |
See also: