title: how to create a form validation which states that input value shouldn't be empty and it should be > 0?
body: <p>I want to make a logic before submitting which states that input value shouldn't be any empty value and it should be greater than 0.</p>
  <pre><code>    &lt;Form className  = &quot;workout-form&quot;&gt;
       &lt;div className =&quot;form-row&quot;&gt;
                &lt;label className =&quot;form__label&quot; value&gt;Duration&lt;/label&gt;
                &lt;input type = 'number' value = {duration} min = '0' onChange = {(e) =&gt; setDuration(e.target.value)} class = 'duration' placeholder=&quot;min&quot; required/&gt;
              &lt;/div&gt;
   &lt;button className =&quot;form-btn&quot; onClick = {submitWorkout}&gt;Add Workout&lt;/button&gt;
  &lt;/Form&gt;
  </code></pre>