{"id":26096279,"url":"https://github.com/juntossomosmais/jsm.fluentvalidation.aspnet.asyncfilter","last_synced_at":"2026-02-22T09:31:23.477Z","repository":{"id":45944503,"uuid":"429170377","full_name":"juntossomosmais/JSM.FluentValidation.AspNet.AsyncFilter","owner":"juntossomosmais","description":"ASP.NET filter that performs async validation using FluentValidation","archived":false,"fork":false,"pushed_at":"2023-01-13T23:30:22.000Z","size":123,"stargazers_count":10,"open_issues_count":3,"forks_count":2,"subscribers_count":42,"default_branch":"main","last_synced_at":"2025-03-21T11:02:53.427Z","etag":null,"topics":["aspnetcore","hacktoberfest","validation-library"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juntossomosmais.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-17T19:13:13.000Z","updated_at":"2024-05-11T05:25:48.000Z","dependencies_parsed_at":"2023-02-09T17:45:32.635Z","dependency_job_id":null,"html_url":"https://github.com/juntossomosmais/JSM.FluentValidation.AspNet.AsyncFilter","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juntossomosmais%2FJSM.FluentValidation.AspNet.AsyncFilter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juntossomosmais%2FJSM.FluentValidation.AspNet.AsyncFilter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juntossomosmais%2FJSM.FluentValidation.AspNet.AsyncFilter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juntossomosmais%2FJSM.FluentValidation.AspNet.AsyncFilter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juntossomosmais","download_url":"https://codeload.github.com/juntossomosmais/JSM.FluentValidation.AspNet.AsyncFilter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248560739,"owners_count":21124714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aspnetcore","hacktoberfest","validation-library"],"created_at":"2025-03-09T14:36:11.643Z","updated_at":"2026-02-22T09:31:23.432Z","avatar_url":"https://github.com/juntossomosmais.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JSM.FluentValidation.AspNet.AsyncFilter\n\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=juntossomosmais_FluentValidation.AspNet.AsyncValidationFilter\u0026metric=alert_status\u0026token=d3b41f78734a4b7551bb7e9452cdfd3847578626)](https://sonarcloud.io/summary/new_code?id=juntossomosmais_FluentValidation.AspNet.AsyncFilter)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=juntossomosmais_FluentValidation.AspNet.AsyncValidationFilter\u0026metric=coverage\u0026token=d3b41f78734a4b7551bb7e9452cdfd3847578626)](https://sonarcloud.io/summary/new_code?id=juntossomosmais_FluentValidation.AspNet.AsyncValidationFilter)\n[![Nuget](https://img.shields.io/nuget/v/JSM.FluentValidation.AspNet.AsyncFilter)](https://www.nuget.org/packages/JSM.FluentValidation.AspNet.AsyncFilter/)\n\n[FluentValidation documentation](https://docs.fluentvalidation.net/en/latest/async.html) states:\n\n\u003eYou should not use asynchronous rules when using automatic validation with ASP.NET as ASP.NET’s validation pipeline is not asynchronous. If you use asynchronous rules with ASP.NET’s automatic validation, they will always be run synchronously.\n\nThis library provides an ASP.NET filter that performs async Validation using FluentValidation.\n\n## Get Started\n\nTo use the filter, first install the NuGet package:\n\n```\ndotnet add package JSM.FluentValidation.AspNet.AsyncFilter\n```\n\nThen, it's necessary to register the filter on the `ConfigureServices` portion of the `Startup.cs`.\n\n```c#\nservices\n    .AddControllers\n    .AddModelValidationAsyncActionFilter();\n```\n\nThe next step is to register the validators of the API:\n\n```c#\nservices\n    .AddScoped\u003cIValidator\u003cMyClass\u003e, MyClassValidator\u003e\u003e();\n```\n\nOr use [automatic registration](https://docs.fluentvalidation.net/en/latest/di.html#automatic-registration).\n\n## Customization\n\nIf also possible to apply the filter only to controllers that contains the [`ApiControllerAttribute`](https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.apicontrollerattribute).\n\n```c#\n    ...\n    .AddModelValidationAsyncActionFilter(options =\u003e\n    {\n        options.OnlyApiController = true;\n    });\n```\n\nThis way, other controllers requests without the attribute will be ignored.\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuntossomosmais%2Fjsm.fluentvalidation.aspnet.asyncfilter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuntossomosmais%2Fjsm.fluentvalidation.aspnet.asyncfilter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuntossomosmais%2Fjsm.fluentvalidation.aspnet.asyncfilter/lists"}