Check out example codes for "Validate length with html". It will help you in understanding the concepts better.

Code Example 1

<input pattern=".{3,}"   required title="3 characters minimum">
<input pattern=".{5,10}" required title="5 to 10 characters">

Code Example 2

<--html forms min. charcter-->
<input pattern=".{3,}"   required title="3 characters minimum">
<input pattern=".{5,10}" required title="5 to 10 characters">

Learn ReactJs, React Native from akashmittal.com