title: limit the value entered by user in amount field in react
body: <p>i want to restrict the user so that he cannot enter more than 50000 in the input value. how should i achieve this in react?
  i am doing this on onchange event.</p>
  <pre><code> onPaymentAmountChanged = (e) =&gt; {
  
          let inputValue = e.target.value;
          if ( inputValue &gt; Number(50000)) {
              console.log(inputValue);
              inputValue=inputValue.replace(/[^0-9.]/,&quot;&quot;);
          }
  }
  
  </code></pre>
  <p>but the above thing is not letting me restrict this. please suggest something</p>