ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Regular Expression to validate number with one decimal point in jQuery<p>Hi&nbsp;<a class="username" rel="chetan">chetan,</a></p> <p>Check this example. Now please take its reference and correct your code.</p> <p><strong><span style="text-decoration: underline;">HTML</span></strong></p> <div class="demo_block"> <pre class="brush: html">&lt;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&gt; &lt;head&gt; &lt;title&gt;&lt;/title&gt; &lt;script type=&#34;text/javascript&#34; src=&#34;https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js&#34;&gt;&lt;/script&gt; &lt;script type=&#34;text/javascript&#34;&gt; $(function () { $(&#39;#txtMeterReading&#39;).keyup(function () { if ($(this).val().length &gt; 0) { var regex = /((\d+)(\.\d{1}))$/; if (regex.test($(this).val())) { $(&#39;#msg&#39;).html(&#34;Valid&#34;); } else { $(&#39;#msg&#39;).html(&#34;Invalid&#34;); } } else { $(&#39;#msg&#39;).html(&#34;&#34;); } }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;input type=&#34;text&#34; id=&#34;txtMeterReading&#34; /&gt; &lt;span id=&#34;msg&#34; style=&#34;color: Red;&#34;&gt;&lt;/span&gt; &lt;/body&gt; &lt;/html&gt;</pre> </div> <p><a class="demo button orange btn btn-red">Demo</a></p>https://www.aspforums.net:443/Threads/196526/Regular-Expression-to-validate-number-with-one-decimal-point-in-jQuery/https://www.aspforums.net:443/Threads/196526/Regular-Expression-to-validate-number-with-one-decimal-point-in-jQuery/Wed, 24 Jul 2019 05:30:40 GMT