I am using MVC 4 with Code First and just starting to use the Fluent API, but I can’t find anywhere where it is mentioned how to provide validation error messages? Can this only be done by using Data Annotations?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
On possibility is to use Data Annotations. Another possibility is to use a differehnt validation framework such as FluentValidation.NET which allows you to specify the error message in your validator rules.