🔮 Sanity Create is here. Writing is reinvented. Try now, no developer setup

Email Field with Validation

By Saskia Bobinska

An Email field, that uses Regex-Validation.


  name: 'email',
  title: 'Email',
  type: 'string',
  validation: Rule => Rule.custom(email => {
      if (typeof email === 'undefined') {
          return true // Allow undefined values
      return email.toLowerCase()
          ? true
          : 'This is not an email'


Other schemas by author