Browse Source

Handle the case where customErrorMessageSet is true.

pull/4097/head
maliming 6 years ago
parent
commit
427d9a5604
  1. 9
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Validation/ValidationAttributeHelper.cs

9
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Validation/ValidationAttributeHelper.cs

@ -20,13 +20,12 @@ namespace Volo.Abp.AspNetCore.Mvc.Validation
{
validationAttribute.ErrorMessage =
"The field {0} must be a string with a minimum length of {2} and a maximum length of {1}.";
return;
}
}
else
{
validationAttribute.ErrorMessage =
ValidationAttributeErrorMessageStringProperty.GetValue(validationAttribute) as string;
}
validationAttribute.ErrorMessage =
ValidationAttributeErrorMessageStringProperty.GetValue(validationAttribute) as string;
}
}
}

Loading…
Cancel
Save