Lasse Edsvik
Lasse Edsvik

Reputation: 9298

Changing validationsummary-text from resourcefile

I was wondering if you guys know howto get the validationsummary "title" from resouce-file?

got this atm:

Html.ValidationSummary("Information missing.")

For my validation I use stuff like:

[Required(ErrorMessageResourceType=typeof(Resources), ErrorMessageResourceName="UsernameRequired")]
public object Username { get; set; }

How can I fix that?

/M

Upvotes: 0

Views: 451

Answers (2)

Misha N.
Misha N.

Reputation: 3455

I don't know if I understood well the nature of the problem, but you could do it like this if you have access to the resource file from web application project:

Html.ValidationSummary(Resources.YourInfomrationMissingKey)

Upvotes: 1

Related Questions