Browse the docs

isEmail

True when text is an email address.

Details #

isEmail(value) is true for one plain address such as jane@x.com (spaces around it are ignored). A name with angle brackets is not; use parseAddresses for those. It never fails, so it is safe in a condition.

Parameters #

Takes 1 argument. {{ isEmail(text) }}

Examples #

isEmail("jane@x.com")
→ true
isEmail("jane@x")
→ false

Gotchas #

  • It checks the shape, not that the mailbox exists.