Hi Team
I have this model and want to bind form field using data-annotation. My problem i cant seem to bind them as once, using one error. Anyone who can help me on this please? Example is on my screenshot view of the form.
- [Required]
- public string StreetAddress { get; set; }
-
- [Required]
- public string StreetAddressLine { get; set; }
-
- [Required]
- public string City { get; set; }
-
- [Required]
- public string StateProvince { get; set; }
-
- [Required(ErrorMessage = "This field is required")]
- public int ZipCode { get; set; }