i am trying to make a generic function for validating more than one field!!! and then display the values on keyup at the front of each field....

success:function(data){
if(data == 1){
return true;
}
else
{
return false;

}

any idea or other alternatives?