{"id":16589,"date":"2024-06-03T04:43:16","date_gmt":"2024-06-03T04:43:16","guid":{"rendered":"https:\/\/positiwise.com\/blog\/?p=16589"},"modified":"2024-06-03T05:32:49","modified_gmt":"2024-06-03T05:32:49","slug":"fluentvalidation-in-asp-dot-net-core-api","status":"publish","type":"post","link":"https:\/\/positiwise.com\/blog\/fluentvalidation-in-asp-dot-net-core-api","title":{"rendered":"Configure FluentValidation in ASP Dot NET Core API"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong class=\"pw-highlight-text-color\"><em>Quick Overview:<\/em><\/strong><br>The FluentValidation simplifies the creation of custom validation rules and allows you to handle complex validation with ease. However, as efficient as it is, prompting it with the right configuration is equally important, therefore, in this blog post, we will first recall our understanding of FluentValidation and then look into the steps to configure FluentValidation in ASP Dot NET Core along with that we will also take a glimpse of the features and benefits of FluentValidation that makes it so crucial for the success and efficiency of your business application.<\/p><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\/#A_Run-Through_NET_Core_vs_Nodejs\" >A Run-Through: .NET Core vs Node.js<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\/#NET_Core\" >.NET Core<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\/#Pros_of_using_NET_Core\" >Pros of using .NET Core<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\/#Nodejs\" >Node.js<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\/#A_Deep_Dive_into_NET_Core_vs_Nodejs\" >A Deep Dive into .NET Core vs. Node.js<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\/#Processing_Approach_and_Performance\" >Processing Approach and Performance<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\/#Security\" >Security<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\/#Scalability\" >Scalability<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\/#Platform_Adaptability\" >Platform Adaptability<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\/#Support_from_Community\" >Support from Community<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\/#Comparison_Table_between_NET_Core_and_Nodejs\" >Comparison Table between .NET Core and Node.js<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\/#Wrapping_Up_on_NET_Core_vs_Nodejs\" >Wrapping Up on .NET Core vs Node.js<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-fluentvalidation\">What is FluentValidation?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Fluent Validation .NET Core Web API is a renowned <a href=\"https:\/\/positiwise.com\/blog\/essential-net-core-libraries-that-every-programmer-should-know\">.NET library<\/a> that creates strong, maintainable validation rules for objects in a type-safe manner. It helps your development teams define the validation rules in a fluent, intuitive way which helps make your code more readable and maintainable. The FlutentValidation supports platforms such as .NET Standard 2.0, .NET Core 3.1, .NET 5, .NET 6, and .NET 7.)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-features-and-benefits-of-fluentvalidation-net-core-api\">Features and Benefits of FluentValidation .NET Core API<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">As with every library framework or tech stack within the market, ASP .NET Core Web API Fluent Validation also has its own set of benefits and features that make it stand out. Here is a list of a few:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Inbuilt Validators: <\/strong>It has several validators such as Regular Expression, Email, Credit Card, and more.<\/li>\n\n\n\n<li><strong>Localization:<\/strong> It helps provide translations for the default validation messages within several messages.<\/li>\n\n\n\n<li><strong>Custom Validators: <\/strong>There are several ways by which you can create a custom, reusable validator.<\/li>\n\n\n\n<li><strong>Asynchronous Validation:<\/strong> It refers to giving you the ability to define the asynchronous rules such as when working with an external API.<\/li>\n\n\n\n<li><strong>Test Extensions: <\/strong>It offers a few extensions that can help with the testing of your validator classes.<\/li>\n\n\n\n<li><strong>Transforming Values: <\/strong>With this you can apply a transformation to a property value before the validation is performed against it.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-configuring-fluentvalidation-in-asp-net-core\">Configuring FluentValidation in ASP.NET Core<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For configuring the FluentValidation in <a href=\"https:\/\/positiwise.com\/hire-asp-net-developers\">ASP.NET Core<\/a>, here are the steps that you should follow:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-step-1-installing-nuget\">Step 1: Installing NuGet<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Install the NuGet packages to use the FluentValidation.<\/p>\n\n\n\n<pre class=\"wp-block-code alignwide\"><code>Install-Package FluentValidation.AspNetCore\nInstall-Package FluentValidation.DependencyInjectionExtensions<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-step-2-configuration-process\">Step 2: Configuration Process<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The next step is the Fluent Validation .NET Core Web API configuration for which initially you must do the automatic registration of validators which is crucial. You can also make use of the <strong><em>FluentValidation.DependencyInjectionExtensions<\/em><\/strong> package, this here you can use to automatically find all the validators within a precise assembly using an extension method.<\/p>\n\n\n\n<pre class=\"wp-block-code alignwide\"><code>using FluentValidationDemoApp.Data;\nusing FluentValidation.AspNetCore;\nusing Microsoft.EntityFrameworkCore;\nusing Microsoft.Extensions.Configuration;\nusing System.Configuration;\nusing System.Reflection;\n\nvar builder = WebApplication.CreateBuilder(args);\n\n\/\/ Now you should add the services to the container.\nbuilder.Services.AddControllers();\n\nbuilder.Services.AddDbContext&lt;ApplicationDBContext>(options =>\n{\n    options.UseSqlite(builder.Configuration.GetConnectionString(\"DefaultConnection\"));\n});\n\nbuilder.Services.AddControllers()\n            .AddFluentValidation(v =>\n            {\n                v.ImplicitlyValidateChildProperties = true;\n                v.ImplicitlyValidateRootCollectionElements = true;\n                v.RegisterValidatorsFromAssembly(Assembly.GetExecutingAssembly());\n            });\n\nbuilder.Services.AddEndpointsApiExplorer();\nbuilder.Services.AddSwaggerGen();\n\nvar app = builder.Build();\n\n\/\/ Now configure the HTTP request pipeline.\nif (app.Environment.IsDevelopment())\n{\n    app.UseSwagger();\n    app.UseSwaggerUI();\n}\n\napp.UseHttpsRedirection();\napp.UseAuthorization();\napp.MapControllers();\napp.Run();<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The above-given code will add the FluentValidation pipeline for the Controllers.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-step-3-validator-implementation\">Step 3: Validator Implementation<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">For defining the set of validation rules for the specific object, you should create a class that will be responsible for inherits from the <strong><em>AbstractValidator&lt;T&gt;<\/em><\/strong>, where<strong><em> T<\/em><\/strong> is the type of the class that you plan on validating.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The validation rules themselves need to be defined within the validator class constructor. To specify the validation rules for a specific property you must call the RuleFor method which will pass a lambda expression indicating the property that you want to validate.<\/p>\n\n\n\n<pre class=\"wp-block-code alignwide\"><code>using FluentValidationDemoApp.DTOs;\nusing FluentValidation;\n\nnamespace FluentValidationDemoApp.Validations\n{\n    public class CustomerValidator : AbstractValidator&lt;CustomerDTO>\n    {\n        public CustomerValidator()\n        {\n            RuleFor(x => x.Name).NotNull().NotEmpty();\n            RuleFor(x => x.Name).Length(20, 250);\n            RuleFor(x => x.PhoneNumber).NotEmpty().WithMessage(\"Please specify a phone number.\");\n            RuleFor(x => x.Age).InclusiveBetween(18, 60);\n\n            \/\/ These are the Complex Properties\n            RuleFor(x => x.Address).InjectValidator();\n\n            \/\/ Moving ahead with the Other way\n            \/\/RuleFor(x => x.Address).SetValidator(new AddressValidator());\n\n            \/\/ This is for the Collections of Complex Types\n            \/\/RuleForEach(x => x.Addresses).SetValidator(new AddressValidator());\n        }\n    }\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code alignwide\"><code>using FluentValidationDemoApp.DTOs;\nusing FluentValidation;\n\nnamespace FluentValidationDemoApp.Validations\n{\n    public class AddressValidator : AbstractValidator&lt;AddressDTO>\n    {\n        public AddressValidator()\n        {\n            RuleFor(x => x.State)\n                .NotNull()\n                .NotEmpty();\n\n            RuleFor(x => x.Country)\n                .NotEmpty()\n                .WithMessage(\"Please specify a Country.\");\n\n            RuleFor(x => x.Postcode)\n                .NotNull()\n                .Must(BeAValidPostcode)\n                .WithMessage(\"Please specify a valid postcode\");\n        }\n\n        private bool BeAValidPostcode(string postcode)\n        {\n            return postcode.Length == 6;\n        }\n    }\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-explaining-the-code\">Explaining the Code<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Here we are using the <strong><em>RuleForEach<\/em><\/strong> method for applying the same rule for multiple items within a collection. Also, we can combine the <strong><em>RuleForEach<\/em><\/strong> with the <strong><em>SetValidator<\/em><\/strong> when the collection is of another complex object.\u00a0<\/li>\n\n\n\n<li>The <strong><em>RuleSets<\/em><\/strong> enables you to group validation rules which can further be executed together as a group while ignoring the other rules.<\/li>\n\n\n\n<li>The Including Rules implies that you can include the rules from other validators delivering on the condition they validate the same type. This enables splitting rules across classes and composes them together.<\/li>\n\n\n\n<li>Validators are also allowed to be used with any dependency injection library. For injecting a validator for a specific model, you should register the validator with the service provider as an<strong><em> IValidator&lt;T>. services.AddScoped&lt;IValidator&lt;Customer, CustomerValidator>();<\/em><\/strong><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code alignwide\"><code>namespace FluentValidationDemoApp.Entities\n{\n    public class Customer\n    {\n        public int Id { get; set; }\n        public string Name { get; set; } = string.Empty;\n        public int Age { get; set; }\n        public string PhoneNumber { get; set; } = string.Empty;\n        public bool IsAdult { get; set; }\n        public Address? Address { get; set; }\n    }\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code alignwide\"><code>namespace FluentValidationDemoApp.Entities\n{\n    public class Address\n    {\n        public int Id { get; set; }\n        public string Line1 { get; set; } = string.Empty;\n        public string Line2 { get; set; } = string.Empty;\n        public string Town { get; set; } = string.Empty;\n        public string Postcode { get; set; } = string.Empty;\n        public string Country { get; set; } = string.Empty;\n        public string State { get; set; } = string.Empty;\n    }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You are not required to explicitly check the <strong><em>ModelState<\/em><\/strong> within the controllers to observe if the input is valid. Within the <strong><em>FluentValidation the ASP.NET<\/em><\/strong> middleware is responsible for automatically finding our validator, and for the cases where the validation fails, it will prepare the ModelState which will lead our action to return a response 400.<\/p>\n\n\n\n<pre class=\"wp-block-code alignwide\"><code>using FluentValidationDemoApp.Data;\nusing FluentValidationDemoApp.DTOs;\nusing FluentValidationDemoApp.Validations;\nusing Microsoft.AspNetCore.Http;\nusing Microsoft.AspNetCore.Mvc;\n\nnamespace FluentValidationDemoApp.Controllers\n{\n    &#91;Route(\"api\/&#91;controller]\")]\n    &#91;ApiController]\n    public class CustomerController : ControllerBase\n    {\n        private readonly ApplicationDBContext _applicationDBContext;\n\n        public CustomerController(ApplicationDBContext applicationDBContext)\n        {\n            _applicationDBContext = applicationDBContext;\n        }\n\n        &#91;HttpPost(\"AddNewCustomer\", Order = 0)]\n        public IActionResult Add(CustomerDTO customer)\n        {\n            if (!ModelState.IsValid)\n            {\n                return BadRequest(ModelState);\n            }\n\n            _applicationDBContext.Add(customer);\n            _applicationDBContext.SaveChanges();\n\n            return Ok();\n        }\n\n        &#91;HttpPost(\"UpdateNewCustomer\", Order = 1)]\n        public IActionResult Update(CustomerDTO customer)\n        {\n            CustomerValidator validator = new CustomerValidator();\n            var validationResult = validator.Validate(customer);\n\n            if (!validationResult.IsValid)\n            {\n                return BadRequest(validationResult.Errors);\n            }\n\n            _applicationDBContext.Update(customer);\n            _applicationDBContext.SaveChanges();\n\n            return Ok();\n        }\n    }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Within the ASP .NET Core Web API Fluent Validation, here you can also explicitly validate the models anywhere. The Validate method here returns a ValidationResult object which contains two properties. One is <strong><em>\u201cIsValid\u201d<\/em><\/strong> which is a boolean that mentions whether the validation succeeded or not. The<strong><em> \u201cErrors\u201d <\/em><\/strong>is a collection of ValidationFailure objects which contain details about any kind of validation failure.<\/p>\n\n\n\n<div class=\"wp-block-group bg-shaps has-background has-global-padding is-layout-constrained wp-container-core-group-is-layout-71df2e02 wp-block-group-is-layout-constrained\" style=\"border-radius:5px;background-color:#151e2c;padding-top:var(--wp--preset--spacing--40);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--40)\">\n<h2 class=\"wp-block-heading has-text-align-center mt-0 has-base-color has-text-color\">Looking to Effortlessly Boost Your .NET Project?<\/h2>\n\n\n\n<p class=\"has-text-align-center fs-5 lh-base has-base-color has-text-color wp-block-paragraph\">Equip your team with exceptional .NET expertise. Bring our skilled .NET Developer on board for your projects now!<\/p>\n\n\n\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-20959078 wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link has-base-color has-text-color has-background wp-element-button\" href=\"https:\/\/positiwise.com\/contact\" style=\"border-radius:100px;background-color:#ed7923;padding-top:10px;padding-right:30px;padding-bottom:10px;padding-left:30px\"><strong>Contact Us Now<\/strong><\/a><\/div>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In conclusion, we are sure that this blog post must have given you significant insight into the ideal steps to configure Fluent Validation .NET Core Web API. However, as a business owner, for more information you can refer to our blog post, <a href=\"https:\/\/positiwise.com\/blog\/fluentvalidation-in-net-core\">FluentValidation in .NET Core: A Complete Guide<\/a> or if you feel stuck within the process you can refer to our detailed blog or are occupied focusing on your core business operations then, get in touch with a leading <a href=\"https:\/\/positiwise.com\/technologies\/dot-net-development\">ASP.NET Core application development company<\/a> like <a href=\"https:\/\/positiwise.com\/\">Positiwise<\/a> to help you with ASP .NET Core Web API Fluent Validation process and pace up your development process.<\/p>\n  <div class=\"related-post slider\">\r\n        <div class=\"headline\">Related Posts<\/div>\r\n    <div class=\"post-list owl-carousel\">\r\n\r\n            <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\".Net Core vs. Java \u2013 Which One You Should Use for Your Projects?\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-java-technology\">\r\n\r\n      <img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"800\" src=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2021\/12\/web-security-partner-1.jpg\" class=\"attachment-full size-full wp-post-image\" alt=\".Net Core vs. Java \u2013 Which One You Should Use for Your Projects?\" srcset=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2021\/12\/web-security-partner-1.jpg 1200w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2021\/12\/web-security-partner-1-300x200.jpg 300w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2021\/12\/web-security-partner-1-1024x683.jpg 1024w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2021\/12\/web-security-partner-1-768x512.jpg 768w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\".Net Core vs. Java \u2013 Which One You Should Use for Your Projects?\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-java-technology\">\r\n        .Net Core vs. Java \u2013 Which One You Should Use for Your Projects?  <\/a>\r\n\r\n        <\/div>\r\n              <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\"Precise Road Map for ASP.NET Developers\" href=\"https:\/\/positiwise.com\/blog\/roadmap-for-asp-dot-net-developers\">\r\n\r\n      <img loading=\"lazy\" decoding=\"async\" width=\"1021\" height=\"621\" src=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/dealership-1200x800-1.jpg\" class=\"attachment-full size-full wp-post-image\" alt=\"Hire ASP.NET Developers - A Precise Road Map to Employ ASP.NET Developers\" srcset=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/dealership-1200x800-1.jpg 1021w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/dealership-1200x800-1-300x182.jpg 300w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/dealership-1200x800-1-768x467.jpg 768w\" sizes=\"auto, (max-width: 1021px) 100vw, 1021px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\"Precise Road Map for ASP.NET Developers\" href=\"https:\/\/positiwise.com\/blog\/roadmap-for-asp-dot-net-developers\">\r\n        Precise Road Map for ASP.NET Developers  <\/a>\r\n\r\n        <\/div>\r\n              <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\".NET Core vs Node.js: The Difference Explained by Web Expert\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\">\r\n\r\n      <img loading=\"lazy\" decoding=\"async\" width=\"1021\" height=\"621\" src=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/NET-Core-VS-Node-js-jpg.webp\" class=\"attachment-full size-full wp-post-image\" alt=\"NET-Core-VS-Node-js\" srcset=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/NET-Core-VS-Node-js-jpg.webp 1021w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/NET-Core-VS-Node-js-300x182.webp 300w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/NET-Core-VS-Node-js-768x467.webp 768w\" sizes=\"auto, (max-width: 1021px) 100vw, 1021px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\".NET Core vs Node.js: The Difference Explained by Web Expert\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-node-js\">\r\n        .NET Core vs Node.js: The Difference Explained by Web Expert  <\/a>\r\n\r\n        <\/div>\r\n      \r\n  <\/div>\r\n\r\n  <script>\r\n      <\/script>\r\n  <style>\r\n    .related-post {}\r\n\r\n    .related-post .post-list {\r\n      text-align: left;\r\n          }\r\n\r\n    .related-post .post-list .item {\r\n      margin: 5px;\r\n      padding: 0px;\r\n          }\r\n\r\n    .related-post .headline {\r\n      font-size: 2rem !important;\r\n      color: #212529 !important;\r\n          }\r\n\r\n    .related-post .headline {\r\nmargin-top: 0;\r\npadding-left: 1%;\r\n}.related-post .post-list .item .post_thumb {\r\n      max-height: 220px;\r\n      margin: 0px 0px 10px 0px;\r\n      padding: 0px;\r\n      display: block;\r\n          }\r\n\r\n    .related-post .post-list .item .post_title {\r\n      font-size: 1rem;\r\n      color: #212529;\r\n      margin: 10px 0px;\r\n      padding: 0px;\r\n      display: block;\r\n      text-decoration: none;\r\n          }\r\n\r\n    .related-post .post-list .item .post_excerpt {\r\n      font-size: 13px;\r\n      color: #3f3f3f;\r\n      margin: 10px 0px;\r\n      padding: 0px;\r\n      display: block;\r\n      text-decoration: none;\r\n          }\r\n\r\n    .related-post .owl-dots .owl-dot {\r\n          }\r\n\r\n      <\/style>\r\n      <script>\r\n      jQuery(document).ready(function($) {\r\n        $(\".related-post .post-list\").owlCarousel({\r\n          items: 3,\r\n          responsiveClass: true,\r\n          responsive: {\r\n            0: {\r\n              items: 1,\r\n            },\r\n            768: {\r\n              items: 2,\r\n            },\r\n            1200: {\r\n              items: 3,\r\n            }\r\n          },\r\n                      rewind: true,\r\n                                loop: true,\r\n                                center: true,\r\n                                autoplay: true,\r\n            autoplayHoverPause: true,\r\n                                nav: true,\r\n            navSpeed: 1000,\r\n            navText: ['<i class=\"fas fa-chevron-left\"><\/i>', '<i class=\"fas fa-chevron-right\"><\/i>'],\r\n                                dots: true,\r\n            dotsSpeed: 1200,\r\n                                                    rtl: false,\r\n          \r\n        });\r\n      });\r\n    <\/script>\r\n  <\/div>\r\n","protected":false},"excerpt":{"rendered":"<p>Quick Overview:The FluentValidation simplifies the creation of custom validation rules and allows you to handle complex validation with [&hellip;]<\/p>\n  <div class=\"related-post slider\">\r\n        <div class=\"headline\">Related Posts<\/div>\r\n    <div class=\"post-list owl-carousel\">\r\n\r\n            <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\".Net Core vs. Java \u2013 Which One You Should Use for Your Projects?\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-java-technology\">\r\n\r\n      <img width=\"1200\" height=\"800\" src=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2021\/12\/web-security-partner-1.jpg\" class=\"attachment-full size-full wp-post-image\" alt=\".Net Core vs. Java \u2013 Which One You Should Use for Your Projects?\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2021\/12\/web-security-partner-1.jpg 1200w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2021\/12\/web-security-partner-1-300x200.jpg 300w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2021\/12\/web-security-partner-1-1024x683.jpg 1024w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2021\/12\/web-security-partner-1-768x512.jpg 768w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\".Net Core vs. Java \u2013 Which One You Should Use for Your Projects?\" href=\"https:\/\/positiwise.com\/blog\/net-core-vs-java-technology\">\r\n        .Net Core vs. Java \u2013 Which One You Should Use for Your Projects?  <\/a>\r\n\r\n        <\/div>\r\n              <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\"Precise Road Map for ASP.NET Developers\" href=\"https:\/\/positiwise.com\/blog\/roadmap-for-asp-dot-net-developers\">\r\n\r\n      <img width=\"1021\" height=\"621\" src=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/dealership-1200x800-1.jpg\" class=\"attachment-full size-full wp-post-image\" alt=\"Hire ASP.NET Developers - A Precise Road Map to Employ ASP.NET Developers\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/dealership-1200x800-1.jpg 1021w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/dealership-1200x800-1-300x182.jpg 300w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/dealership-1200x800-1-768x467.jpg 768w\" sizes=\"auto, (max-width: 1021px) 100vw, 1021px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\"Precise Road Map for ASP.NET Developers\" href=\"https:\/\/positiwise.com\/blog\/roadmap-for-asp-dot-net-developers\">\r\n        Precise Road Map for ASP.NET Developers  <\/a>\r\n\r\n        <\/div>\r\n              <div class=\"item\">\r\n            <div class=\"thumb post_thumb\">\r\n    <a  title=\"A Descriptive Guide to .NET Framework\" href=\"https:\/\/positiwise.com\/blog\/a-descriptive-guide-to-dot-net-framework\">\r\n\r\n      <img width=\"1021\" height=\"621\" src=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/a-descriptive-guide-to-dot-net-framework.jpg\" class=\"attachment-full size-full wp-post-image\" alt=\"A Descriptive Guide to .NET Framework\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/a-descriptive-guide-to-dot-net-framework.jpg 1021w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/a-descriptive-guide-to-dot-net-framework-300x182.jpg 300w, https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2022\/01\/a-descriptive-guide-to-dot-net-framework-768x467.jpg 768w\" sizes=\"auto, (max-width: 1021px) 100vw, 1021px\" \/>\r\n\r\n    <\/a>\r\n  <\/div>\r\n\r\n  <a class=\"title post_title\"  title=\"A Descriptive Guide to .NET Framework\" href=\"https:\/\/positiwise.com\/blog\/a-descriptive-guide-to-dot-net-framework\">\r\n        A Descriptive Guide to .NET Framework  <\/a>\r\n\r\n        <\/div>\r\n      \r\n  <\/div>\r\n\r\n  <script>\r\n      <\/script>\r\n  <style>\r\n    .related-post {}\r\n\r\n    .related-post .post-list {\r\n      text-align: left;\r\n          }\r\n\r\n    .related-post .post-list .item {\r\n      margin: 5px;\r\n      padding: 0px;\r\n          }\r\n\r\n    .related-post .headline {\r\n      font-size: 2rem !important;\r\n      color: #212529 !important;\r\n          }\r\n\r\n    .related-post .headline {\r\nmargin-top: 0;\r\npadding-left: 1%;\r\n}.related-post .post-list .item .post_thumb {\r\n      max-height: 220px;\r\n      margin: 0px 0px 10px 0px;\r\n      padding: 0px;\r\n      display: block;\r\n          }\r\n\r\n    .related-post .post-list .item .post_title {\r\n      font-size: 1rem;\r\n      color: #212529;\r\n      margin: 10px 0px;\r\n      padding: 0px;\r\n      display: block;\r\n      text-decoration: none;\r\n          }\r\n\r\n    .related-post .post-list .item .post_excerpt {\r\n      font-size: 13px;\r\n      color: #3f3f3f;\r\n      margin: 10px 0px;\r\n      padding: 0px;\r\n      display: block;\r\n      text-decoration: none;\r\n          }\r\n\r\n    .related-post .owl-dots .owl-dot {\r\n          }\r\n\r\n      <\/style>\r\n      <script>\r\n      jQuery(document).ready(function($) {\r\n        $(\".related-post .post-list\").owlCarousel({\r\n          items: 3,\r\n          responsiveClass: true,\r\n          responsive: {\r\n            0: {\r\n              items: 1,\r\n            },\r\n            768: {\r\n              items: 2,\r\n            },\r\n            1200: {\r\n              items: 3,\r\n            }\r\n          },\r\n                      rewind: true,\r\n                                loop: true,\r\n                                center: true,\r\n                                autoplay: true,\r\n            autoplayHoverPause: true,\r\n                                nav: true,\r\n            navSpeed: 1000,\r\n            navText: ['<i class=\"fas fa-chevron-left\"><\/i>', '<i class=\"fas fa-chevron-right\"><\/i>'],\r\n                                dots: true,\r\n            dotsSpeed: 1200,\r\n                                                    rtl: false,\r\n          \r\n        });\r\n      });\r\n    <\/script>\r\n  <\/div>\r\n","protected":false},"author":3,"featured_media":16593,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","footnotes":""},"categories":[7],"tags":[857,858,856],"class_list":["post-16589","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dot-net-development","tag-fluent-validation","tag-fluent-validation-net-core-api","tag-fluentvalidation"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Configure FluentValidation in ASP Dot NET Core API - Positiwise<\/title>\n<meta name=\"description\" content=\"Learn how to configure FluentValidation in ASP.NET Core Web API for streamlined and robust validation of your models.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/positiwise.com\/blog\/fluentvalidation-in-asp-dot-net-core-api\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Configure FluentValidation in ASP Dot NET Core API - Positiwise\" \/>\n<meta property=\"og:description\" content=\"Learn how to configure FluentValidation in ASP.NET Core Web API for streamlined and robust validation of your models.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/positiwise.com\/blog\/fluentvalidation-in-asp-dot-net-core-api\" \/>\n<meta property=\"og:site_name\" content=\"Positiwise\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/positiwise\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-06-03T04:43:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-06-03T05:32:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2024\/06\/FluentValidation-in-ASP-Dot-NET-Core-API-jpg.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1021\" \/>\n\t<meta property=\"og:image:height\" content=\"621\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Parag Mehta\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@positiwise\" \/>\n<meta name=\"twitter:site\" content=\"@positiwise\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Parag Mehta\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/fluentvalidation-in-asp-dot-net-core-api#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/fluentvalidation-in-asp-dot-net-core-api\"},\"author\":{\"name\":\"Parag Mehta\",\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/#\\\/schema\\\/person\\\/b4b3d9970ea94f5914a615f70345353a\"},\"headline\":\"Configure FluentValidation in ASP Dot NET Core API\",\"datePublished\":\"2024-06-03T04:43:16+00:00\",\"dateModified\":\"2024-06-03T05:32:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/fluentvalidation-in-asp-dot-net-core-api\"},\"wordCount\":886,\"publisher\":{\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/fluentvalidation-in-asp-dot-net-core-api#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/FluentValidation-in-ASP-Dot-NET-Core-API-jpg.webp\",\"keywords\":[\"fluent validation\",\"fluent validation .net core api\",\"fluentvalidation\"],\"articleSection\":[\".NET Development\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2022\",\"copyrightHolder\":{\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/fluentvalidation-in-asp-dot-net-core-api\",\"url\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/fluentvalidation-in-asp-dot-net-core-api\",\"name\":\"Configure FluentValidation in ASP Dot NET Core API - Positiwise\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/fluentvalidation-in-asp-dot-net-core-api#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/fluentvalidation-in-asp-dot-net-core-api#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/FluentValidation-in-ASP-Dot-NET-Core-API-jpg.webp\",\"datePublished\":\"2024-06-03T04:43:16+00:00\",\"dateModified\":\"2024-06-03T05:32:49+00:00\",\"description\":\"Learn how to configure FluentValidation in ASP.NET Core Web API for streamlined and robust validation of your models.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/fluentvalidation-in-asp-dot-net-core-api#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/positiwise.com\\\/blog\\\/fluentvalidation-in-asp-dot-net-core-api\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/fluentvalidation-in-asp-dot-net-core-api#primaryimage\",\"url\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/FluentValidation-in-ASP-Dot-NET-Core-API-jpg.webp\",\"contentUrl\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/06\\\/FluentValidation-in-ASP-Dot-NET-Core-API-jpg.webp\",\"width\":1021,\"height\":621,\"caption\":\"FluentValidation-in-ASP-Dot-NET-Core-API\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/fluentvalidation-in-asp-dot-net-core-api#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/positiwise.com\\\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Configure FluentValidation in ASP Dot NET Core API\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/\",\"name\":\"Positiwise\",\"description\":\"Providing Full-cycle Software Development Services\",\"publisher\":{\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/#organization\"},\"alternateName\":\"Positiwise Software Pvt Ltd\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/#organization\",\"name\":\"Positiwise\",\"alternateName\":\"Positiwise Software Pvt Ltd\",\"url\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"width\":202,\"height\":29,\"caption\":\"Positiwise\"},\"image\":{\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/positiwise\\\/\",\"https:\\\/\\\/x.com\\\/positiwise\",\"https:\\\/\\\/github.com\\\/positiwise\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/positiwise\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/#\\\/schema\\\/person\\\/b4b3d9970ea94f5914a615f70345353a\",\"name\":\"Parag Mehta\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/072ea4a638415a77610a840228d51b8225ad88856ed34d69cbe1fcd638390535?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/072ea4a638415a77610a840228d51b8225ad88856ed34d69cbe1fcd638390535?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/072ea4a638415a77610a840228d51b8225ad88856ed34d69cbe1fcd638390535?s=96&r=g\",\"caption\":\"Parag Mehta\"},\"description\":\"Parag Mehta, the CEO and Founder of Positiwise Software Pvt Ltd has extensive knowledge of the development niche. He is implementing custom strategies to craft highly-appealing and robust applications for its clients and supporting employees to grow and ace the tasks. He is a consistent learner and always provides the best-in-quality solutions, accelerating productivity.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/paragcmehta\"],\"url\":\"https:\\\/\\\/positiwise.com\\\/blog\\\/author\\\/parag-mehta\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Configure FluentValidation in ASP Dot NET Core API - Positiwise","description":"Learn how to configure FluentValidation in ASP.NET Core Web API for streamlined and robust validation of your models.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/positiwise.com\/blog\/fluentvalidation-in-asp-dot-net-core-api","og_locale":"en_US","og_type":"article","og_title":"Configure FluentValidation in ASP Dot NET Core API - Positiwise","og_description":"Learn how to configure FluentValidation in ASP.NET Core Web API for streamlined and robust validation of your models.","og_url":"https:\/\/positiwise.com\/blog\/fluentvalidation-in-asp-dot-net-core-api","og_site_name":"Positiwise","article_publisher":"https:\/\/www.facebook.com\/positiwise\/","article_published_time":"2024-06-03T04:43:16+00:00","article_modified_time":"2024-06-03T05:32:49+00:00","og_image":[{"width":1021,"height":621,"url":"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2024\/06\/FluentValidation-in-ASP-Dot-NET-Core-API-jpg.webp","type":"image\/jpeg"}],"author":"Parag Mehta","twitter_card":"summary_large_image","twitter_creator":"@positiwise","twitter_site":"@positiwise","twitter_misc":{"Written by":"Parag Mehta","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/positiwise.com\/blog\/fluentvalidation-in-asp-dot-net-core-api#article","isPartOf":{"@id":"https:\/\/positiwise.com\/blog\/fluentvalidation-in-asp-dot-net-core-api"},"author":{"name":"Parag Mehta","@id":"https:\/\/positiwise.com\/blog\/#\/schema\/person\/b4b3d9970ea94f5914a615f70345353a"},"headline":"Configure FluentValidation in ASP Dot NET Core API","datePublished":"2024-06-03T04:43:16+00:00","dateModified":"2024-06-03T05:32:49+00:00","mainEntityOfPage":{"@id":"https:\/\/positiwise.com\/blog\/fluentvalidation-in-asp-dot-net-core-api"},"wordCount":886,"publisher":{"@id":"https:\/\/positiwise.com\/blog\/#organization"},"image":{"@id":"https:\/\/positiwise.com\/blog\/fluentvalidation-in-asp-dot-net-core-api#primaryimage"},"thumbnailUrl":"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2024\/06\/FluentValidation-in-ASP-Dot-NET-Core-API-jpg.webp","keywords":["fluent validation","fluent validation .net core api","fluentvalidation"],"articleSection":[".NET Development"],"inLanguage":"en-US","copyrightYear":"2022","copyrightHolder":{"@id":"https:\/\/positiwise.com\/blog\/#organization"}},{"@type":"WebPage","@id":"https:\/\/positiwise.com\/blog\/fluentvalidation-in-asp-dot-net-core-api","url":"https:\/\/positiwise.com\/blog\/fluentvalidation-in-asp-dot-net-core-api","name":"Configure FluentValidation in ASP Dot NET Core API - Positiwise","isPartOf":{"@id":"https:\/\/positiwise.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/positiwise.com\/blog\/fluentvalidation-in-asp-dot-net-core-api#primaryimage"},"image":{"@id":"https:\/\/positiwise.com\/blog\/fluentvalidation-in-asp-dot-net-core-api#primaryimage"},"thumbnailUrl":"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2024\/06\/FluentValidation-in-ASP-Dot-NET-Core-API-jpg.webp","datePublished":"2024-06-03T04:43:16+00:00","dateModified":"2024-06-03T05:32:49+00:00","description":"Learn how to configure FluentValidation in ASP.NET Core Web API for streamlined and robust validation of your models.","breadcrumb":{"@id":"https:\/\/positiwise.com\/blog\/fluentvalidation-in-asp-dot-net-core-api#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/positiwise.com\/blog\/fluentvalidation-in-asp-dot-net-core-api"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/positiwise.com\/blog\/fluentvalidation-in-asp-dot-net-core-api#primaryimage","url":"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2024\/06\/FluentValidation-in-ASP-Dot-NET-Core-API-jpg.webp","contentUrl":"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2024\/06\/FluentValidation-in-ASP-Dot-NET-Core-API-jpg.webp","width":1021,"height":621,"caption":"FluentValidation-in-ASP-Dot-NET-Core-API"},{"@type":"BreadcrumbList","@id":"https:\/\/positiwise.com\/blog\/fluentvalidation-in-asp-dot-net-core-api#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/positiwise.com\/blog"},{"@type":"ListItem","position":2,"name":"Configure FluentValidation in ASP Dot NET Core API"}]},{"@type":"WebSite","@id":"https:\/\/positiwise.com\/blog\/#website","url":"https:\/\/positiwise.com\/blog\/","name":"Positiwise","description":"Providing Full-cycle Software Development Services","publisher":{"@id":"https:\/\/positiwise.com\/blog\/#organization"},"alternateName":"Positiwise Software Pvt Ltd","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/positiwise.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/positiwise.com\/blog\/#organization","name":"Positiwise","alternateName":"Positiwise Software Pvt Ltd","url":"https:\/\/positiwise.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/positiwise.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2023\/07\/logo.png","contentUrl":"https:\/\/positiwise.com\/blog\/wp-content\/uploads\/2023\/07\/logo.png","width":202,"height":29,"caption":"Positiwise"},"image":{"@id":"https:\/\/positiwise.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/positiwise\/","https:\/\/x.com\/positiwise","https:\/\/github.com\/positiwise","https:\/\/www.linkedin.com\/company\/positiwise"]},{"@type":"Person","@id":"https:\/\/positiwise.com\/blog\/#\/schema\/person\/b4b3d9970ea94f5914a615f70345353a","name":"Parag Mehta","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/072ea4a638415a77610a840228d51b8225ad88856ed34d69cbe1fcd638390535?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/072ea4a638415a77610a840228d51b8225ad88856ed34d69cbe1fcd638390535?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/072ea4a638415a77610a840228d51b8225ad88856ed34d69cbe1fcd638390535?s=96&r=g","caption":"Parag Mehta"},"description":"Parag Mehta, the CEO and Founder of Positiwise Software Pvt Ltd has extensive knowledge of the development niche. He is implementing custom strategies to craft highly-appealing and robust applications for its clients and supporting employees to grow and ace the tasks. He is a consistent learner and always provides the best-in-quality solutions, accelerating productivity.","sameAs":["https:\/\/www.linkedin.com\/in\/paragcmehta"],"url":"https:\/\/positiwise.com\/blog\/author\/parag-mehta"}]}},"_links":{"self":[{"href":"https:\/\/positiwise.com\/blog\/wp-json\/wp\/v2\/posts\/16589","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/positiwise.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/positiwise.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/positiwise.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/positiwise.com\/blog\/wp-json\/wp\/v2\/comments?post=16589"}],"version-history":[{"count":4,"href":"https:\/\/positiwise.com\/blog\/wp-json\/wp\/v2\/posts\/16589\/revisions"}],"predecessor-version":[{"id":16598,"href":"https:\/\/positiwise.com\/blog\/wp-json\/wp\/v2\/posts\/16589\/revisions\/16598"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/positiwise.com\/blog\/wp-json\/wp\/v2\/media\/16593"}],"wp:attachment":[{"href":"https:\/\/positiwise.com\/blog\/wp-json\/wp\/v2\/media?parent=16589"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/positiwise.com\/blog\/wp-json\/wp\/v2\/categories?post=16589"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/positiwise.com\/blog\/wp-json\/wp\/v2\/tags?post=16589"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}