in my code i am restricting only numeric values into my input field for that i am using this code.
if($('.calculator #loan_Amount').val() != "") {
var value = $('.calculator #loan_Amount').val().replace(/^\s\s*/, '').replace(/\s\s*$/, '');
var intRegex = /^\d+$/;
if(!intRegex.test(value)) {
alert('Loan amount must be numeric.');
return false;
}
}
but now if i enter the value 6500.25 it says the value has to be numeric it is not taking the decimal digit as numeric. is any body having idea regarding it