Check out example codes for "C# form required attribute". It will help you in understanding the concepts better.

Code Example 1

<form action="/action_page.php">

   <label for="username">Username:</label>
  <input type="text" 
    id="username" name="username" required>
  <input type="submit">

 </form>

Code Example 2

@Html.TextBoxFor(m => m.ShortName, 
new { @class = "form-control", placeholder = "short name", required="required"})

Learn ReactJs, React Native from akashmittal.com