From 40863bc408cd102876faebf0467a0a69822df2d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20=C3=87otur?= Date: Mon, 29 Jun 2020 13:34:56 +0300 Subject: [PATCH] Update DynamicMaxLengthAttributeAdapter.cs --- .../DataAnnotations/DynamicMaxLengthAttributeAdapter.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/DataAnnotations/DynamicMaxLengthAttributeAdapter.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/DataAnnotations/DynamicMaxLengthAttributeAdapter.cs index ca3b3ce7ab..9791534aac 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/DataAnnotations/DynamicMaxLengthAttributeAdapter.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/DataAnnotations/DynamicMaxLengthAttributeAdapter.cs @@ -33,12 +33,13 @@ namespace Volo.Abp.AspNetCore.Mvc.DataAnnotations { Check.NotNull(context, nameof(context)); - MergeAttribute(context.Attributes, "data-val", "true"); - MergeAttribute(context.Attributes, "data-val-length", GetErrorMessage(context)); + MergeAttribute(context.Attributes, "data-val", "true"); + MergeAttribute(context.Attributes, "data-val-maxlength", GetErrorMessage(context)); + MergeAttribute(context.Attributes, "data-val-maxlength-max", _max); if (Attribute.Length != int.MaxValue) { - MergeAttribute(context.Attributes, "data-val-length-max", _max); + MergeAttribute(context.Attributes, "data-val-maxlength-max", _max); } } }