nealstewart / backbone.validations

Declarative, HTML5 Attribute-Inspired Validations for Backbone
301 stars 37 forks source link

email 'test@example.com@example.com' does not fail validation #40

Closed tomru closed 8 years ago

tomru commented 10 years ago

Hi there,

following test does not fail, although it should

  var EmailTestModel = Backbone.Model.extend({
    validate : {
      email : {
        type : "email"
      }
    }
  });

  var m = new EmailTestModel;
  equal(m.set({email : "test@example.com@example.com"}, {validate: true}), false);