website/assets/js/payment.js
function( form ) {
		var inputGroups = form.find( '.inputGroup' ), 
			isValid = true,
			inputGroup, 
			i;

		for( i = 0; i < inputGroups.length; i++ ) {
			inputGroup = $( inputGroups[ i ] );
			
			if( $.trim( inputGroup.find( 'input' ).val() ).length === 0 ) {
				inputGroup.addClass( 'error' );
				isValid = false;
			} else {
				inputGroup.removeClass( 'error' );
			}
		}

		return isValid;
	}
function( form ) {
		var inputGroups = form.find( '.inputGroup' ), 
			isValid = true,
			inputGroup, 
			i;

		for( i = 0; i < inputGroups.length; i++ ) {
			inputGroup = $( inputGroups[ i ] );
			
			if( $.trim( inputGroup.find( 'input' ).val() ).length === 0 ) {
				inputGroup.addClass( 'error' );
				isValid = false;
			} else {
				inputGroup.removeClass( 'error' );
			}
		}

		return isValid;
	}
function ( form ) { var inputGroups = form . find ( '.inputGroup' ) , isValid = true , inputGroup , i ; for ( i = 0 ; i < inputGroups . length ; i ++ ) { inputGroup = $ ( inputGroups [ i ] ) ; if ( $ . trim ( inputGroup . find ( 'input' ) . val ( ) ) . length === 0 ) { inputGroup . addClass ( 'error' ) ; isValid = false ; } else { inputGroup . removeClass ( 'error' ) ; } } return isValid ; }
Validate the forms input fields

@param   {jQuery Element} form

@returns {Boolean}
Validate the forms input fields