WIP
This commit is contained in:
parent
6e4e7f7386
commit
5388e7cb7b
1 changed files with 5 additions and 0 deletions
|
@ -190,6 +190,11 @@ fn validate_email_struct(value: &Email) -> Result<(), ValidationError> {
|
|||
fn validate_emoji(value: &str) -> Result<(), ValidationError> {
|
||||
let error = Err(ValidationError::new("not a Unicode emoji or :emoji_code:"));
|
||||
|
||||
// "star", "heart", "good" are explicitly allowed
|
||||
if ["star", "heart", "good"].contains(&value) {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
// check if `value` is a Unicode emoji
|
||||
if emojis::get(value).is_some() {
|
||||
return Ok(());
|
||||
|
|
Loading…
Reference in a new issue