$('#price').keyup(function(e){ var entered_value = $(this).val(); var regexPattern = /^\d{0,8}(\.\d{1,2})?$/; //Allow only Number as well 0nly 2 digit after dot(.) if(regexPattern.test(entered_value)) { alert("false") ; } else { alert("true"); } });
Html, JAVA,DOTNET,Javascript, PHP, and JQuery Scripts and its issues with solutions
Showing posts with label decimal. Show all posts
Showing posts with label decimal. Show all posts
Tuesday, 19 August 2014
Input field JQuery float validation, decimal validation
Subscribe to:
Posts (Atom)