Skip to content

Commit

Permalink
Don't try and validation JSON Types
Browse files Browse the repository at this point in the history
  • Loading branch information
niemyjski committed Oct 16, 2023
1 parent 4b24ab1 commit 9e85449
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Exceptionless.Web/Utility/AutoValidationActionFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionE
if (parameter.Name == null || !context.ActionArguments.TryGetValue(parameter.Name, out object? subject) || subject is null)
continue;

// We don't support validating JSON Types
if (subject is Newtonsoft.Json.Linq.JToken)
continue;

(bool isValid, var errors) = await MiniValidator.TryValidateAsync(subject, _serviceProvider, recurse: true);
if (isValid)
continue;
Expand Down

0 comments on commit 9e85449

Please sign in to comment.