JSFiddle - React, Tailwind, and code Playground
HTML
<label class="labelinput" for="phonenum">Phone Number:</label>
<input type="text" id="cell" name="cell" class="forminput" />
<button>check</button>
JavaScript
$('button').on('click', function () {
if (!/^[0]\d{9}$/.test($('#cell').val())) {
alert('wrong phone number');
}
});