- get isTagsInputDisabled () {
- return this.video.tags.length >= 3;
- }
-
- getInvalidFieldsTitle() {
- let title = '';
- const nameControl = this.videoForm.controls['name'];
- const descriptionControl = this.videoForm.controls['description'];
-
- if (!nameControl.valid) {
- title += 'A name is required\n';
- }
-
- if (this.video.tags.length === 0) {
- title += 'At least one tag is required\n';
- }
-
- if (this.filename === null) {
- title += 'A file is required\n';
- }
-
- if (!descriptionControl.valid) {
- title += 'A description is required\n';
- }
+ buildForm() {
+ this.form = this.formBuilder.group({
+ name: [ '', VIDEO_NAME.VALIDATORS ],
+ description: [ '', VIDEO_DESCRIPTION.VALIDATORS ],
+ currentTag: [ '', VIDEO_TAGS.VALIDATORS ]
+ });