I have a Country model class with the CultureId property that is NOT marked as required. Another class "CountryViewModel" has the same property "CultureId".
When visualizing the Create view, I noticed that validation data attributes were added to the CultureId text box, although data annotations were added.
I use
@Html.HiddenFor(mode => mode.CultureId)
What could be causing this behavior?
thanks
source share