|
|
|
@ -17,7 +17,7 @@ export class AddUnitComponent implements OnInit {
|
|
|
|
|
constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient, private toTree: TreeService) { } |
|
|
|
|
ngOnInit(): void { |
|
|
|
|
this.validateForm = this.fb.group({ |
|
|
|
|
unitname: [null, [Validators.required]], |
|
|
|
|
unitname: [null, [Validators.required, Validators.pattern("[^\\s\\r\\n]{1,100}")]], |
|
|
|
|
person: [null], |
|
|
|
|
phone: [null], |
|
|
|
|
addr: [null], |
|
|
|
@ -31,5 +31,7 @@ export class AddUnitComponent implements OnInit {
|
|
|
|
|
this.modal.destroy({ data: 'this the result data' }); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
xxx(){ |
|
|
|
|
console.log(this.validateForm.controls['unitname']) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|