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

  • Home
  • SEARCH
  • 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 8067203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:12:59+00:00 2026-06-05T12:12:59+00:00

I have a Entity Framework model class that has a view to create an

  • 0

I have a Entity Framework model class that has a view to create an instance of that model class. I wanted to validate dates on that class so that users add dates that meet certain criteria. I have a metadata class that uses attributes from the System.ComponentModel and System.ComponentModel.DataAnnotations namespaces.

Is there any attribute from there that I can use to perform the validation or is there some other way I can do this?

  • 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-05T12:13:00+00:00Added an answer on June 5, 2026 at 12:13 pm

    You’ll need a CustomValidationAttribute, as existing attributes don’t know their “object” (each property has no idea of other properties of the instance).

    But my choice would go to FluentValidation, which has a nice fluent interface and give you the choice to interact between the properties of the object to validate.

    http://fluentvalidation.codeplex.com

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

Sidebar

Related Questions

We have an entity framework model with has some inheritance in it. The following
I have an Entity Framework Entity that looks something like this: class ListItemEtlObject {
I have a WPF app that uses an Entity Framework Model. One of the
I have 2 projects - a class library containing an EDM Entity Framework model
I have a class library that I use to hold the Entity Framework Data
I currently have an Entity Framework model that collects data from a legacy database
I have a following problem. I have a class in the entity framework model
I have an Entity Framework data model. Part of the model is a Customer
I have created a Dynamic Data site against an Entity Framework Model I have
I have a simple ADO.NET Entity Framework 4.0 model (edmx) which defines database tables

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.