mocks.js
function(type, field) {
			var objDesc = sforce.db.schema[type];
			for(var i = 0; i < objDesc.fields.length; i++)
				if(objDesc.fields[i].name === field)
					return;
			throw 'No field exists by the name: ' + field + 'in the type: ' + type;
		}
function(type, field) {
			var objDesc = sforce.db.schema[type];
			for(var i = 0; i < objDesc.fields.length; i++)
				if(objDesc.fields[i].name === field)
					return;
			throw 'No field exists by the name: ' + field + 'in the type: ' + type;
		}
Validates a field name against a type in the schema