I would like to format with DataAnnotation currency but default en
in the model:
[Column("cur_mensalidade")]
[DataType(DataType.Currency)]
[DisplayFormat(DataFormatString = "{0:C0}")]
public decimal? Mensalidade { get; set; }
but does not accept the comma. even in web.config by placing
<system.web>
<globalization uiCulture="pt" culture="pt-BR" enableClientBasedCulture="false" />
Ihavetriedtocreatearegularexpression,toformat
[RegularExpression(@"^\d+(\.|\,)\d{2}$", ErrorMessage = "{0} valor incorreto.")]