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 7984743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:22:11+00:00 2026-06-04T11:22:11+00:00

depending on configuration at each site, some fields on a form may or may

  • 0

depending on configuration at each site, some fields on a form may or may not be required. Can I apply the [Required] attribute to fields of my ViewModel in code? I’d like to take advantage of all the conveniences of form validation, but I can’t hard-code the [Required] attribute.

  • 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-04T11:22:12+00:00Added an answer on June 4, 2026 at 11:22 am

    Checkout FluentValidation.NET. It could be used as a replacement of Data Annotations and has great integration with ASP.NET MVC. It allows you to define dynamic validation rules based on runtime conditions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there some additional configuration needed before I can set thread priorities in a
I have a dynamic library that gets a different name depending on configuration, specified
Depending on my task in Vim I have several tabs open. How can I
Depending on the font settings (DPI and such) on the user's computers, I can
I have an action method that depending on some conditions needs to return a
I have a form where depending on the website's brand one of two input
I am facing some trouble trying to configure a particular configuration for a NumericUpDown
My application has the following UI configuration: The main form is an MDI container.
I'm working on a SaaS application where each customer will have different configurations depending
I'm not so experienced but i worked on some big Java EE projects (using

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.