daily pastebin goal
2%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 38 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class ParentModel
  2. {
  3.     public string Name { get; set; }
  4.  
  5.     public ChildModel[] Items
  6. }
  7.  
  8. public class ChildModel
  9. {
  10.     [MinLength(1, ErrorMessage = "At least 1 value needed.")]
  11.     public int[] Values
  12. }
  13.    
  14. public async Task<IHttpActionResult> Post(ParentModel model)
  15. {
  16.     if (!ModelState.IsValid)
  17.         return BadRequest(ModelState);
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top