src/validation.js
function( field ){
    var tagName = field.tagName.toLowerCase();

    if( tagName == 'input' && field.type == 'checkbox' ){
        return field.checked;
    }

    if( tagName == 'select' ){
        return field.options[field.selectedIndex].value;
    }

    return field.value;
}
function( field ){
    var tagName = field.tagName.toLowerCase();

    if( tagName == 'input' && field.type == 'checkbox' ){
        return field.checked;
    }

    if( tagName == 'select' ){
        return field.options[field.selectedIndex].value;
    }

    return field.value;
}
function ( field ) { var tagName = field . tagName . toLowerCase ( ) ; if ( tagName == 'input' && field . type == 'checkbox' ) { return field . checked ; } if ( tagName == 'select' ) { return field . options [ field . selectedIndex ] . value ; } return field . value ; }
Get the value of a field node, hiding the differences among
different type of inputs.

@param  {DOMElement} field The field.
@return {String}       The current value of the given field.
Get the value of a field node hiding the differences among different type of inputs .