function validate() {
		var nonEmpty;
		var current;
		var diff;
		var line;
		var prev;
		var loc;
		var msg;
		var i;

		nonEmpty = [];
		for ( i = 0; i < lines.length; i++ ) {
			if ( trim( lines[ i ] ) !== '' ) {
				nonEmpty.push( i );
			}
		}
		nonEmpty.unshift( -1 ); // allows empty lines at beginning to be checked
		nonEmpty.push( lines.length ); // allows trailing empty lines to be checked
		for ( i = 1; i < nonEmpty.length; i++ ) {
			diff = 2;
			msg = 'Only one blank line is allowed';
			current = nonEmpty[ i ];
			prev = nonEmpty[ i-1 ];
			line = lines[ current ];
			if ( line && isSectionHeader( line ) ) {
				diff += 1;
				msg = 'Not more than two blank lines are allowed before a section header';
			}
			if ( current - prev > diff ) {
				loc = {
					'start': {
						'line': prev + 1,
						'column': 0
					},
					'end': {
						'line': current,
						'column': 0
					}
				};
				report( msg, loc, {
					'beforeHeader': diff === 3,
					'lastLine': i === nonEmpty.length-1
				});
			}
		}
	}
Checks whether code contains multiple blank lines.

@private