fix(module: form): validation message unique (#1391)

This commit is contained in:
James Yeung 2021-04-20 16:03:25 +08:00 committed by GitHub
parent 3abec5f4ba
commit 555e398336

View File

@ -202,7 +202,7 @@ namespace AntDesign
CurrentEditContext.OnValidationStateChanged += (s, e) =>
{
control.ValidationMessages = CurrentEditContext.GetValidationMessages(control.FieldIdentifier).ToArray();
control.ValidationMessages = CurrentEditContext.GetValidationMessages(control.FieldIdentifier).Distinct().ToArray();
this._isValid = !control.ValidationMessages.Any();
StateHasChanged();