Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ParentModel
- {
- public string Name { get; set; }
- public ChildModel[] Items
- }
- public class ChildModel
- {
- [MinLength(1, ErrorMessage = "At least 1 value needed.")]
- public int[] Values
- }
- public async Task<IHttpActionResult> Post(ParentModel model)
- {
- if (!ModelState.IsValid)
- return BadRequest(ModelState);
- }
Add Comment
Please, Sign In to add comment