client/plugins/vcard/js/vcardjs-0.3.js
function validateCompoundWithType(attribute, values) {
		            for(var i in values) {
		                var value = values[i];
		                if(typeof(value) !== 'object') {
			                  errors.push([attribute + '-' + i, "not-an-object"]);
		                } else if(! value.type) {
			                  errors.push([attribute + '-' + i, "missing-type"]);
		                } else if(! value.value) { // empty values are not allowed.
			                  errors.push([attribute + '-' + i, "missing-value"]);
		                }
		            }
	          }
function validateCompoundWithType(attribute, values) {
		            for(var i in values) {
		                var value = values[i];
		                if(typeof(value) !== 'object') {
			                  errors.push([attribute + '-' + i, "not-an-object"]);
		                } else if(! value.type) {
			                  errors.push([attribute + '-' + i, "missing-type"]);
		                } else if(! value.value) { // empty values are not allowed.
			                  errors.push([attribute + '-' + i, "missing-value"]);
		                }
		            }
	          }
function validateCompoundWithType ( attribute , values ) { for ( var i in values ) { var value = values [ i ] ; if ( typeof ( value ) !== 'object' ) { errors . push ( [ attribute + '-' + i , "not-an-object" ] ) ; } else if ( ! value . type ) { errors . push ( [ attribute + '-' + i , "missing-type" ] ) ; } else if ( ! value . value ) { // empty values are not allowed. errors . push ( [ attribute + '-' + i , "missing-value" ] ) ; } } }
make sure compound fields have their type & value set (to prevent mistakes such as vcard.addAttribute('email', 'foo@bar.baz')
make sure compound fields have their type & value set ( to prevent mistakes such as vcard . addAttribute ( email foo