c# - Retrieve Custom Data Annotations for create Custom LabelFor -


i creating custom labelfor. inside want dataannotations properties linked attribute dataannotations created me , i'm not getting. example: obrigatorio

i need values of dataannotations labelfor leave fields in bold when required. , depending on validation, leave customized styles.

my class

public class gruporisco : ientidadebase {     [key]     public int gruporiscoid { get; set; }     [obrigatorio]     [display(name="descrição")]     public string descricao { get; set; } } 

my custom atribute

public class obrigatorio : requiredattribute {     public obrigatorio()     {         errormessage = "* obrigatório";     } } 

the attribute above simple, create complex attributes.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -