mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-19 07:53:02 +00:00
119799: Prevent submission from updating the dropdown values when hitting enter in another input form (onsubmit)
This commit is contained in:
@@ -130,6 +130,9 @@ export class FormService {
|
||||
}
|
||||
|
||||
public addControlErrors(field: AbstractControl, formId: string, fieldId: string, fieldIndex: number) {
|
||||
if (field.errors === null) {
|
||||
return;
|
||||
}
|
||||
const errors: string[] = Object.keys(field.errors)
|
||||
.filter((errorKey) => field.errors[errorKey] === true)
|
||||
.map((errorKey) => `error.validation.${errorKey}`);
|
||||
|
Reference in New Issue
Block a user