views:

94

answers:

1

I'm pretty new to MVC, I'm trying to create a model that can be localized, but it doesn't seem like that would be possible given that I have to use a custom property attribute to define displayname and validation properties.

Is there a way to dynamically create the model metadata attributes (DisplayName, UIHint, etc..) as opposed to having to define each one using custom property attributes? Ideally i'd like to keep my metadata in a table, xml file - something along those lines.

A: 

This post may be a start:

Globalizing ASP.NET MVC Client Validation

About getting metadata from DB table: I've never seen something like this.

Other useful links:

Database injection into a validation attribute with ASP MVC and Castle Windsor

asp.net mvc database interaction validation

Dynamic data validation in ASP.NET MVC

Leniel Macaferi