I am using aspnetzero framework (ASP.NET Core and Angular based SPA), when using APIs, if I enter non-numeric value in numeric property or non-boolean value in boolean property then it throws validation errors as below :
"message": "Your request is not valid!",
"details": "The following errors were detected during validation. - The value 'sf' is not valid for ResultCount. ",
"validationErrors": [
{
"message": "The value 'sf' is not valid for MaxResultCount.",
"members": [
"resultCount"
],
}
]
This is thrown by AbpValidationActionFilter, I want to update the error message here, to not to include the input value entered by user.
Can someone help me understand, how error message can be changed or is there a way to replace AbpValidationActionFilter with custom filter ?