Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8381383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:41:10+00:00 2026-06-09T16:41:10+00:00

I am using Fluent Validation for server-side and unobtrusive client-side validation in MVC. I

  • 0

I am using Fluent Validation for server-side and unobtrusive client-side validation in MVC. I have had to extend it to suit business needs, and am running into issues with the default DataAnnotations validation. So I just want to completely disable the built-in DataAnnotations provider, and use my own Fluent Validation extensions for doing this validation.

Basically, I need to stop the rendering of the built-in unobtrusive data-val- attributes for value types, such as numbers and dates (data-val-number, data-val-date, data-val-required).

I’ve tried:

ModelValidatorProviders.Providers.Clear();

And that seems to get rid of the number/date attributes, but required attributes are still there.

I tried:

DataAnnotationsModelValidatorProvider.AddImplicitRequiredAttributeForValueTypes = false;

But that doesn’t seem to do anything. Maybe I have it in the wrong location/order?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T16:41:12+00:00Added an answer on June 9, 2026 at 4:41 pm

    With Fluent Validation, it has its own flag for disabling required attributes, which has to be configured using FluentValidationModelValidatorProvider. The following code will take care of both the default type attributes as well as required attributes:

    //Don't use built-in type attributes (data-val-number, data-val-date)
    ModelValidatorProviders.Providers.Clear();
    
    FluentValidationModelValidatorProvider.Configure(
        provider =>
        {
            provider.ValidatorFactory = new UnityValidatorFactory(container);
    
            //Don't use built-in data-val-required
            provider.AddImplicitRequiredValidator = false;
        }
    );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Fluent Validation with the Ninject.Web.Mvc.FluentValidation library to automatically wire up all of
I'm using asp.net mvc 3 with jquery unobtrusive validation. I recently changed from standard
So I have my View Model validation down using Fluent Validation and my Service
I'm using fluent validation in MVC 3. Is it possible to turn off fluent
I have an ASP.NET MVC3 website setup using fluent validation and ninject. The validation
I am using a standard validation with MVC, acrossed with my fluent nHibernate [DisplayName(Product
Using Fluent Interface design here if i call something like dog.Train(Running).Train(Eating).Do(Running).Do(Eating); what is the
I'm using Fluent NHibernate, and auto-mapping the classes. I have a computed property in
I have a WPF Application using Fluent NHibernate 1.0 RTM and System.Data.SQLite 1.0.65 that
Following the article http://www.thekip.nl/2011/09/22/using-fluentvalidation-for-both-domain-validation-and-validation-in-mvc-projects/ for me it's not still clear where does the validation

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.