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
Vivek Joy
NA
137
26.9k
validation
Mar 2 2016 2:47 AM
This is my code in mvc
public class UserViewModel
{
[Key]
public int UserId { get; set; }
[Display(Name="Family Name")]
[Required]
public string FamilyName { get; set; }
[Required]
[Display(Name="Father Name")]
public string FatherName { get; set; }
[Required]
public string Name { get; set; }
[Display(Name="Family Unit Name")]
[Required]
public int FamilyUnitId { get; set; }
public virtual FamilyUnit FamilyUnit { get; set; }
[Required]
public string Username { get; set; }
[DataType(DataType.Password)]
[Required]
public string Password { get; set; }
[DataType(DataType.Password)]
[Display(Name="Confirm Password")]
[System.ComponentModel.DataAnnotations.Compare("Password", ErrorMessage = "Password doesnot match.")]
[Required]
public string ConfirmPassword { get; set; }
}
}
I have applied all the code of confirm password validation and when username exits it will show error
How to fix this error?Can anyone help me please
Reply
Answers (
2
)
How to upload files from gridview Item template multiple row
Create SQL Database using Entity Framework Code First ?