Join us this Friday for AI in Action at the Virtual Happy Hour! This free virtual event is open to all—enroll now on Academy and don’t miss out.
Join us this Friday for AI in Action at the Virtual Happy Hour! This free virtual event is open to all—enroll now on Academy and don’t miss out.
You can use @Html.ValidationMessageFor, e.g @Html.ValidationMessageFor(m => m.Ssn, Html.Translate("/formerror/ssnrequired"))
The suggestion from Tim works, but the error messages are always rendered with <span class="field-validation-valid"></span> or <span class="field-validation-error"></span>. This was confusing for me at least. :)
Hi
I am trying to show localized error messages. I dont want hardcoded messages in my model. I have removed code to keep it simple.
My model
My view
I guess i have to use ErrorMessageResourceType and ErrorMessageResourceName but how do i do that?
Cheers Øyvind