module.exports = (sequelize, DataTypes) => {
  const User = sequelize.define('User', {
    username: {
      type: DataTypes.STRING,
      allowNull: false,
      unique: true,
    },
    password: {
      type: DataTypes.STRING,
      allowNull: false,
    },
    email: {
      type: DataTypes.STRING,
      allowNull: false,
      unique: true
    },
    salt: DataTypes.STRING
  });

  User.associate = (models) => {
    User.hasMany(models.Message, {
      foreignKey: 'userId'
    });
    User.belongsToMany(models.Group, {
      as: 'Members',
      foreignKey: 'groupId',
      through: 'UserGroup',
    });
  };
  return User;
};

@@ -339,16 +339,133 @@
 ue: true
+,%0A      validate: %7B%0A        isEmail: %7B%0A          args: true,%0A          msg: 'Invalid email address'%0A        %7D%0A      %7D
 %0A    %7D,%0A

Add email validation