6
I would like to format with Dataannotation currency but standard
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
<system.web>
<globalization uiCulture="pt" culture="pt-BR" enableClientBasedCulture="false" />
I have tried creating a regular expression to format
[RegularExpression(@"^\d+(\.|\,)\d{2}$", ErrorMessage = "{0} valor incorreto.")]
You refer to the comma referring to "coins"?
– Randrade
this. is in a pattern us
– Dorathoto