Bootstrap.Forms.Field = Ember.View.extend({
  tagName: 'div',
  classNameBindings: ['form-group'],
  labelCache: undefined,
  help: undefined,
  template: Ember.Handlebars.compile([
    '{{view view.labelView viewName="labelView"}}',
    '{{view view.inputField viewName="inputField"}}',
    '{{view view.errorsView}}',
    '{{view view.helpView}}'].join("\n")),

  label: Ember.computed(function(key, value) {
    if(arguments.length === 1){
      if(this.get('labelCache') === undefined){
        var path = this.get('valueBinding._from');
        if (path) {
          path = path.split(".");
          return path[path.length - 1];
        }
      } else {
        return this.get('labelCache');
      }
    } else {
      this.set('labelCache', value);
      return value;
    }
  }).property(),

  labelView: Ember.View.extend({
    tagName: 'label',
    classNames: ['control-label'],
    template: Ember.Handlebars.compile('{{view.value}}'),

    value: Ember.computed(function(key, value) {
      var parent = this.get('parentView');

      if (value && value !== parent.get('label')) {
        parent.set('label', value);
      } else {
        value = parent.get('label');
      }

      // If the labelCache property is present on parent, then the
      // label was set manually, and there's no need to humanise it.
      // Otherwise, it comes from the binding and needs to be
      // humanised.
      return parent.get('labelCache') === undefined || parent.get('labelCache') === false ?
        Bootstrap.Forms.human(value) : value;
    }).property('parentView.label'),

    inputElementId: 'for',
    forBinding: 'inputElementId',
    attributeBindings: ['for']
  }),

  inputField: Ember.View.extend({
    classNames: ['ember-bootstrap-extend', 'form-control'],
    tagName: 'div',
    template: Ember.Handlebars.compile('This class is not meant to be used directly, but extended.')
  }),

  errorsView: Ember.View.extend({
    tagName: 'div',
    classNames: ['errors', 'help-inline'],

    _updateContent: Ember.observer(function() {
      var parent = this.get('parentView');

      if (parent !== null) {
        var binding = parent.get('valueBinding._from');
        var fieldName = null;
        var object = null;

        if (binding) {
          binding = binding.replace("_parentView.", "").split(".");
          fieldName = binding[binding.length - 1];
          object = parent.get(binding.slice(0, binding.length-1).join('.'));
        } else {
          fieldName = parent.get('label');
          object = parent.get('context');
        }

        if (object && !object.get('isValid')) {
          var errors = object.get('errors');

          if (errors && fieldName in errors && !Ember.isEmpty(errors[fieldName])) {
            parent.$().addClass('has-error');
            this.$().html(errors[fieldName].join(', '));
          } else {
            parent.$().removeClass('has-error');
            this.$().html('');
          }
        } else {
          parent.$().removeClass('has-error');
          this.$().html('');
        }
      }
    }, 'parentView.context.isValid', 'parentView.label')
  }),

  helpView: Ember.View.extend({
    tagName: 'div',
    classNames: ['help-block'],
    template: Ember.Handlebars.compile('{{view.content}}'),
    contentBinding: 'parentView.help'
  }),

  didInsertElement: function() {
    this.set('labelView.inputElementId', this.get('inputField.elementId'));
  }
});

@@ -78,16 +78,17 @@
 ings: %5B'
+:
 form-gro
@@ -90,16 +90,50 @@
 m-group'
+, 'isValid:has-no-error:has-error'
 %5D,%0A  lab
@@ -171,16 +171,33 @@
 efined,%0A
+  isValid: true,%0A
   templa
@@ -2054,53 +2054,116 @@
 '%5D,%0A
-%0A
     
-_updateContent: Ember.observer(function(
+template: Ember.Handlebars.compile('%7B%7Bview.message%7D%7D'),%0A%0A    message: Ember.computed(function(key, value
 ) %7B%0A
@@ -2225,17 +2225,16 @@
 arent !=
-=
  null) %7B
@@ -2881,32 +2881,28 @@
 ent.
-$().addClass('has-error'
+set('isValid', false
 );%0A 
@@ -2912,30 +2912,23 @@
         
-this.$().html(
+return 
 errors%5Bf
@@ -2947,17 +2947,16 @@
 in(', ')
-)
 ;%0A      
@@ -2991,35 +2991,27 @@
 ent.
-$().removeClass('has-error'
+set('isValid', true
 );%0A 
@@ -3021,33 +3021,25 @@
         
-this.$().html(
+return 
 ''
-)
 ;%0A      
@@ -3082,65 +3082,49 @@
 ent.
-$().removeClass('has-error');%0A          this.$().html(
+set('isValid', true);%0A          return 
 ''
-)
 ;%0A  
@@ -3144,18 +3144,27 @@
  %7D%0A    %7D
-, 
+).property(
 'parentV

stop manually manipulating the dom in the errors management