define('ember-cli-simple-validation/components/validation-error-field', ['exports', 'ember'], function (exports, Ember) {

    'use strict';

    var ValidationErrorField = Ember['default'].Component.extend({
        tagName: "span",
        classNameBindings: ["visible"],
        attributeBindings: ["className", "model", "field", "validation", "submitted", "delayed"],
        visible: function() {
            var className = this.get("className");
            var isDirty = this.get("isDirty");
            var validation = this.get("validation");
            var submitted = this.get("submitted");
            var delayed = this.get("delayed");
            var condition = delayed === true ? !validation && submitted : !validation && (isDirty || submitted);
            if(condition) {
                return className;
            }
            return className ? "hidden %@".fmt(className) : "hidden";
        }.property("validation", "isDirty", "submitted"),
        initialize: function() {
            var isDirty = "model.%@IsDirty".fmt(this.get("field"));
            Ember['default'].Binding.from(isDirty).to("isDirty").connect(this);
        }.on("init")
    });

    exports['default'] = ValidationErrorField;

});
define('ember-cli-simple-validation/mixins/validate', ['exports', 'ember'], function (exports, Ember) {

    'use strict';

    function attrs(mixin) {
        var attributes = [];
        var factory = mixin.get("constructor.ClassMixin.ownerConstructor");
        factory.eachComputedProperty(function (key) {
            if (key.indexOf("Validation") > 1) {
                attributes.push(key);
            }
        });
        return attributes;
    }

    var ValidationMixin = Ember['default'].Mixin.create({
        validate: function() {
            var self = this;
            var attributes = attrs(this);
            Ember['default'].defineProperty(this, "valid", Ember['default'].computed(function() {
                var result;
                attributes.forEach(function(attr, index) {
                    result = index === 0 ? self.get(attr) : self.get(attr) && result;
                });
                return result;
            }).property("" + attributes));
        }.on("init")
    });

    var validate = function(field, options) {
        return function() {
            var value = this.getWithDefault(field, "");
            if (typeof(options) === "object") {
                return options.test(value);
            }
            return value.trim().length > 0;
        }.property(field);
    };

    exports.ValidationMixin = ValidationMixin;
    exports.validate = validate;

});
define("ember-cli-simple-validation", ["ember-cli-simple-validation/index","exports"], function(__index__, __exports__) {
  "use strict";
  Object.keys(__index__).forEach(function(key){
    __exports__[key] = __index__[key];
  });
});
//# sourceMappingURL=ember-cli-simple-validation.map