se i campi input sono tutti type=text, potrebbe essere del tipo:

function CheckValue (obblig, obj, tipo) {
if (obblig==1){
if (obj.value.length==0){
alert("campo obbligatorio");
return false;
}
}
if (tipo == 2){
if (isNaN(obj.value)){
alert("il valore digitato non è numerico");
return true;
}
}
// ecc...continua tu i casi
return true;
}