function toggleValidCss(isValid, validationErrorKey) {
    validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';
    $animate.setClass(element,
      (isValid ? VALID_CLASS : INVALID_CLASS) + validationErrorKey,
      (isValid ? INVALID_CLASS : VALID_CLASS) + validationErrorKey);
  }
@ngdoc method
@name form.FormController#$addControl

@description
Register a control with the form.

Input elements using ngModelController do this automatically when they are linked.