TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
rus tan
NA
52
11k
start date end date validation
Oct 24 2019 4:22 AM
start date and end date model validation
public class CreateLeaveModel
{
public int LeavesTaken { get; set; }
public string Reason { get; set; }
public int Days { get; set; }
[Compare DateTime("StartDate < EndDate",ErrorMessage ="Start Date must be earlier than End Date")]
public DateTime StartDate { get; set; }
[Compare DateTime("StartDate < EndDate", ErrorMessage = "End Date must be later than Start Date")]
public DateTime EndDate { get; set; }
public int Status { get; set; } = 0;
}
what is the correct way?
Reply
Answers (
3
)
error 404 management system menu cannot be accessed
instead of now i want the details keyed in the form