Skip to content

Commit 15c3188

Browse files
committed
feat(book-new): add validations
1 parent baf3b78 commit 15c3188

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/app/book/book-new/book-new.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export class BookNewComponent implements OnInit {
1717
ngOnInit() {
1818

1919
this.form = this.fb.group({
20+
isbn: ['', Validators.compose([Validators.required, Validators.minLength(13),Validators.maxLength(13)])],
2021
title: ['', Validators.required],
2122
author: ['', Validators.required]
2223
});

0 commit comments

Comments
 (0)