Permalink
Browse files

Step 5.9: Add validators

  • Loading branch information...
1 parent 9bd7b7e commit a67ce8f342a81f53e8904f15ed0b972e5108976b @kamilkisiela kamilkisiela committed with DAB0mB Sep 21, 2016
Showing with 3 additions and 3 deletions.
  1. +3 −3 client/imports/app/parties/parties-form.component.ts
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
-import { FormGroup, FormBuilder } from '@angular/forms';
+import { FormGroup, FormBuilder, Validators } from '@angular/forms';
import template from './parties-form.component.html';
@@ -16,9 +16,9 @@ export class PartiesFormComponent implements OnInit {
ngOnInit() {
this.addForm = this.formBuilder.group({
- name: [],
+ name: ['', Validators.required],
description: [],
- location: []
+ location: ['', Validators.required]
});
}
}

0 comments on commit a67ce8f

Please sign in to comment.