get error() {
const control = this.form.controls[this.control];
if( control && this.form.submitted ) {
let firstError;
Object.keys(this.errors).some(err => {
if( control.hasError(err) ) {
firstError = this.errors[err];
return true;
}
});
return firstError;
}
}