Issue 1:
I'm submitting a ... (check one with "x")

code HeroFormComponent .ts
import { Component} from '@angular/core';
import { FormControl, FormGroup, Validators,FormBuilder } from '@angular/forms';
import { ValidationService } from './validation.service';
@Component({
selector: 'hero-form',
templateUrl: 'app/hero-form.component.html'
template: `
<form [formGroup]="form" (ngSubmit)="onSubmit()">

<div formGroupName="name">
<input formControlName="first" placeholder="First name">
<input formControlName="last" placeholder="Last name">
</div>
<input formControlName="email" placeholder="Email">
<button type="submit">Submit</button>
</form>
`,
})

export class HeroFormComponent {
form: any;
constructor(private _formBuilder: FormBuilder) {
this.form = new FormGroup({
name: new FormGroup({
first: new FormControl('Nancy',Validators.compose([Validators.required,ValidationService.codeValidator])),
last: new FormControl('Drew',Validators.compose([Validators.required,ValidationService.codeValidator]))
}),
email: new FormControl('kjA001', Validators.compose([Validators.required]))
});
}

code ValidationService.ts
export class ValidationService {
static getValidatorErrorMessage(code: string) {
let config = {
'required': '该字段必填',
'invalidCode': '验证码错误!',
};
return config[code];
}

static codeValidator(control) {
// 验证码
if (control.value.match(/^[0-9]{6}$/)) {
return null;
} else {
return { 'invalidCode': true };
}
}
}

https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

When change the input frame's error value

this.form.errors is null

Expected behavior

this.form.errors show the current error: { 'invalidCode': true }

Reproduction of the problem

Have so a piece of code in the source code:

dir.valueAccessor.registerOnChange(function (newValue) {

dir.viewToModelUpdate(newValue);

control.markAsDirty();

control.setValue(newValue, { emitModelToViewChange: false });

});

FormControl.prototype.setValue = function (value, _a) {

var _this = this;

var _b = _a === void 0 ? {} : _a, onlySelf = _b.onlySelf, emitEvent = _b.emitEvent, emitModelToViewChange = _b.emitModelToViewChange, emitViewToModelChange = _b.emitViewToModelChange;

emitModelToViewChange = isPresent(emitModelToViewChange) ? emitModelToViewChange : true;

emitViewToModelChange = isPresent(emitViewToModelChange) ? emitViewToModelChange : true;

this._value = value;

if (this._onChange.length && emitModelToViewChange) {

this._onChange.forEach(function (changeFn) { return changeFn(_this._value, emitViewToModelChange); });

}

this.updateValueAndValidity({ onlySelf: onlySelf, emitEvent: emitEvent });

};

The inside of the source onlySelf is undefined

onlySelf:false;

Continue to the source code below this.updateValueAndValidity

AbstractControl.prototype.updateValueAndValidity = function (_a) {
var _b = _a === void 0 ? {} : _a, onlySelf = _b.onlySelf, emitEvent = _b.emitEvent;
onlySelf = normalizeBool(onlySelf);
emitEvent = isPresent(emitEvent) ? emitEvent : true;
this._setInitialStatus();
this._updateValue();
if (this.enabled) {
this._errors = this._runValidator();
this._status = this._calculateStatus();
if (this._status === VALID || this._status === PENDING) {
this._runAsyncValidator(emitEvent);
}
}
if (emitEvent) {
this._valueChanges.emit(this._value);
this._statusChanges.emit(this._status);
}
if (isPresent(this._parent) && !onlySelf) {
this._parent.updateValueAndValidity({ onlySelf: onlySelf, emitEvent: emitEvent });
}
};

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

Angular version: 2.0.0

Browser: [Chrome ]

Language: [TypeScript ]

Node (for AoT issues): node --version =

Issue 2:
I'm submitting a ... (check one with "x")

[ ] bug report
[x feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

When there are errors in a form group, the formGroup.status is 'INVALID' but the formGroup.errors property is null.

ex.

formGroup.controls.username.errors: {invalidEmail: true}
formGroup.errors: null

Expected/desired behavior

When the validity of a FormControl changes, have the parent FormGroup.errors merged with the errors from the controls. This is similar to how the angularjs formController.$error property works.

https://docs.angularjs.org/api/ng/type/form.FormController

What is the motivation / use case for changing the behavior?

This would be helpful because I prefer to only disable a submit button when specific errors are on a form, such as required. With this I could drive that attribute off the formControl.errors value instead of formControl.status.

ex.

From:
<button [disabled]="myForm.status !== 'VALID'">Submit</button>

To:
<button [disabled]="myForm.errors.required">Submit</button>