Salary Column Validation

$(‘input[title=”SalaryAdvance”]’).keypress(function(e) {
var $regex = /^[0-9-]*$/;
var $str = String.fromCharCode(!e.charCode ? e.which : e.charCode);
if ($regex.test($str))
return true;
alert(‘Please enter numbers only!’);
return false;
// Using Key Press Function Validating the Currency field Using JQuery

if( $(‘input[title=”SalaryAdvance”]’).val()== undefined || $(‘input[title=”SalaryAdvance”]’).val()== “”)
alert(“Please Enter Salary Advance”);
return false;
// To Give a focus out function to the column SalaryAdvance


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: