dist/validetta.js
function( el, error ) {
        // We want display errors ?
        if ( !this.options.showErrorMessages ) {
          // because of form not valid, set handler true for break submit
          this.handler = true;
          return;
        }
        var elParent = this.parents( el );
        // If the parent element undefined, that means el is an object. So we need to transform to the element
        if( typeof elParent === 'undefined' ) elParent = el[0].parentNode;
        // if there is an error window which previously opened for el, return
        if ( elParent.querySelectorAll( '.'+ this.options.errorTemplateClass ).length ) return;
        // Create the error window object which will be appear
        var errorObject = document.createElement('span');
        errorObject.className = this.options.errorTemplateClass + ' '+this.options.errorTemplateClass + '--' + this.options.bubblePosition;
        // if error display is bubble, calculate to positions
        if( this.options.display === 'bubble' ) {
          var pos, W = 0, H = 0;
          // !! Here, JQuery functions are using to support the IE8
          pos = $( el ).position();

          if ( this.options.bubblePosition === 'bottom' ){
            H = el.offsetHeight;
          }
          else {
            W = el.offsetWidth;
          }
          errorObject.innerHTML = '';
          errorObject.style.top = pos.top + H + this.options.bubbleGapTop +'px';
          errorObject.style.left = pos.left + W + this.options.bubbleGapLeft +'px'
        }
        elParent.appendChild( errorObject );
        errorObject.innerHTML = error ;

        // we have an error so we need to break submit
        // set to handler true
        this.handler = true;
      }
function( el, error ) {
        // We want display errors ?
        if ( !this.options.showErrorMessages ) {
          // because of form not valid, set handler true for break submit
          this.handler = true;
          return;
        }
        var elParent = this.parents( el );
        // If the parent element undefined, that means el is an object. So we need to transform to the element
        if( typeof elParent === 'undefined' ) elParent = el[0].parentNode;
        // if there is an error window which previously opened for el, return
        if ( elParent.querySelectorAll( '.'+ this.options.errorTemplateClass ).length ) return;
        // Create the error window object which will be appear
        var errorObject = document.createElement('span');
        errorObject.className = this.options.errorTemplateClass + ' '+this.options.errorTemplateClass + '--' + this.options.bubblePosition;
        // if error display is bubble, calculate to positions
        if( this.options.display === 'bubble' ) {
          var pos, W = 0, H = 0;
          // !! Here, JQuery functions are using to support the IE8
          pos = $( el ).position();

          if ( this.options.bubblePosition === 'bottom' ){
            H = el.offsetHeight;
          }
          else {
            W = el.offsetWidth;
          }
          errorObject.innerHTML = '';
          errorObject.style.top = pos.top + H + this.options.bubbleGapTop +'px';
          errorObject.style.left = pos.left + W + this.options.bubbleGapLeft +'px'
        }
        elParent.appendChild( errorObject );
        errorObject.innerHTML = error ;

        // we have an error so we need to break submit
        // set to handler true
        this.handler = true;
      }
function ( el , error ) { // We want display errors ?
 if ( ! this . options . showErrorMessages ) { // because of form not valid, set handler true for break submit
 this . handler = true ; return ; } var elParent = this . parents ( el ) ; // If the parent element undefined, that means el is an object. So we need to transform to the element
 if ( typeof elParent === 'undefined' ) elParent = el [ 0 ] . parentNode ; // if there is an error window which previously opened for el, return
 if ( elParent . querySelectorAll ( '.' + this . options . errorTemplateClass ) . length ) return ; // Create the error window object which will be appear
 var errorObject = document . createElement ( 'span' ) ; errorObject . className = this . options . errorTemplateClass + ' ' + this . options . errorTemplateClass + '--' + this . options . bubblePosition ; // if error display is bubble, calculate to positions
 if ( this . options . display === 'bubble' ) { var pos , W = 0 , H = 0 ; // !! Here, JQuery functions are using to support the IE8
 pos = $ ( el ) . position ( ) ; if ( this . options . bubblePosition === 'bottom' ) { H = el . offsetHeight ; } else { W = el . offsetWidth ; } errorObject . innerHTML = '' ; errorObject . style . top = pos . top + H + this . options . bubbleGapTop + 'px' ; errorObject . style . left = pos . left + W + this . options . bubbleGapLeft + 'px' } elParent . appendChild ( errorObject ) ; errorObject . innerHTML = error ; // we have an error so we need to break submit
 // set to handler true
 this . handler = true ; }
Error window opens

@params {object} el : element which has an error ( it can be native element or jQuery object )
@params {string} error : error messages
Error window opens