Adds validators on DMP editor model
This commit is contained in:
parent
4aedfdd7f6
commit
ae22578710
|
@ -51,8 +51,8 @@ export class DmpEditorModel {
|
|||
this.organisations = item.organisations;
|
||||
this.researchers = item.researchers;
|
||||
this.profiles = item.profiles;
|
||||
// this.datasets = item.datasets;
|
||||
// this.datasetsToBeFinalized = item.datasetsToBeFinalized;
|
||||
this.datasets = item.datasets;
|
||||
this.datasetsToBeFinalized = item.datasetsToBeFinalized;
|
||||
this.associatedUsers = item.associatedUsers;
|
||||
this.users = item.users;
|
||||
if (item.definition) { this.definition = item.definition; }
|
||||
|
@ -76,8 +76,8 @@ export class DmpEditorModel {
|
|||
organisations: [{ value: this.organisations, disabled: disabled }, context.getValidation('organisations').validators],
|
||||
researchers: [{ value: this.researchers, disabled: disabled }, context.getValidation('researchers').validators],
|
||||
profiles: [{ value: this.profiles, disabled: disabled }, context.getValidation('profiles').validators],
|
||||
// datasets: [{ value: this.datasets, disabled: disabled }, context.getValidation('datasets').validators],
|
||||
// datasetsToBeFinalized: [{ value: this.datasetsToBeFinalized, disabled: disabled }],
|
||||
datasets: [{ value: this.datasets, disabled: disabled }, context.getValidation('datasets').validators],
|
||||
datasetsToBeFinalized: [{ value: this.datasetsToBeFinalized, disabled: disabled }, context.getValidation('datasetsToBeFinalized').validators],
|
||||
associatedUsers: [{ value: this.associatedUsers, disabled: disabled }, context.getValidation('associatedUsers').validators],
|
||||
users: [{ value: this.users, disabled: disabled }, context.getValidation('users').validators]
|
||||
});
|
||||
|
@ -102,8 +102,8 @@ export class DmpEditorModel {
|
|||
baseContext.validation.push({ key: 'organisations', validators: [BackendErrorValidator(this.validationErrorModel, 'organisations')] });
|
||||
baseContext.validation.push({ key: 'researchers', validators: [BackendErrorValidator(this.validationErrorModel, 'researchers')] });
|
||||
baseContext.validation.push({ key: 'profiles', validators: [Validators.required, ValidJsonValidator, BackendErrorValidator(this.validationErrorModel, 'profiles')] });
|
||||
// baseContext.validation.push({ key: 'datasets', validators: [BackendErrorValidator(this.validationErrorModel, 'datasets')] });
|
||||
// baseContext.validation.push({ key: 'datasetsToBeFinalized', validators: [BackendErrorValidator(this.validationErrorModel, 'datasetsToBeFinalized')] });
|
||||
baseContext.validation.push({ key: 'datasets', validators: [BackendErrorValidator(this.validationErrorModel, 'datasets')] });
|
||||
baseContext.validation.push({ key: 'datasetsToBeFinalized', validators: [BackendErrorValidator(this.validationErrorModel, 'datasetsToBeFinalized')] });
|
||||
baseContext.validation.push({ key: 'associatedUsers', validators: [BackendErrorValidator(this.validationErrorModel, 'associatedUsers')] });
|
||||
baseContext.validation.push({ key: 'users', validators: [BackendErrorValidator(this.validationErrorModel, 'users')] });
|
||||
|
||||
|
|
Loading…
Reference in New Issue