JSFiddle - React, Tailwind, and code Playground
by UI Designer
HTML
<input type="text" name="txt" onchange="if(!this.value.match(/^\D*0(\D*\d){9}\D*$/)) {alert('Phone Number is Invalid');}"/>
by UI Designer
<input type="text" name="txt" onchange="if(!this.value.match(/^\D*0(\D*\d){9}\D*$/)) {alert('Phone Number is Invalid');}"/>