           name = $(element).val()
           istext = checkIsName(name)
         else
-          istext = null
-
-
-      controlClass = (element, checkme) ->
+          return null
+
+
+      controlClass = (element, type, checkme) ->
         if checkme is true
           $(element)
             .addClass "checked"
-            .removeClass "error"
+            .removeClass "#{type}-field-error"
           $(element).closest(".form-group").removeClass "has-error"
         else
           $(element).closest(".form-group").addClass "has-error"
           $(element)
             .removeClass "checked"
-            .addClass "error"
+            .addClass "#{type}-field-error"
 
       # The main function that
       # is fired when the form

          number = $(element).val()
          isnumber = checkIsNumber(number)
        else
          isnumber = null

      fieldText = (element) ->
        isText = $(element).attr "data-text"

          checkAllComplete(".checked")

        if $(this).hasClass "submit-ready"
          # Debug
          # log "submit"

          # This is the callback function
          # which can be used to fire another
          # function like an Ajax submission
          # when the form is fully compiled

          settings.callback.call(this)
        else
          # Few checks to be run when the
          # button is clicked to do some
          # magic animations when the form
          # is NOT correctly compiled

          # Debug
          # log "don't submit"

          $theErrorField = $("[class$=-field-error]").first()
          $theErrorField.focus()
          theErrorFieldValue = if $theErrorField.val() isnt "" then $theErrorField.val() else null
          theErrorFieldPlaceholder = $theErrorField.attr "placeholder"

          log "is the placeholder: #{theErrorFieldPlaceholder}"
          log "is the value: #{theErrorFieldValue}"

          # Check the error
          isDataMail = $theErrorField.hasClass "mail-field-error"
          isDataText = $theErrorField.hasClass "text-field-error"
          isDataNumber = $theErrorField.hasClass "number-field-error"
          isDataLength = $theErrorField.hasClass "length-field-error"
          isDataCheckbox = $theErrorField.attr "checkbox-field-error"

          # Get the "data-lenght" to use into the errorå
          theDataLenght = $theErrorField.attr "data-length"

          # Print the right error depending on
          # what the error is displayed by its class

          # Data -length error
          if isDataLengt
            if theDataLenght > 1
              $theErrorField.val("").attr "placeholder", errorsArray[3].val.first + " #{theDataLenght} " + errorsArray[3].val.second
            else
              $theErrorField.val("").attr "placeholder", errorsArray[4].val

          # Data -mail error
          if isDataMail
            $theErrorField.val("").attr "placeholder", errorsArray[0].val

          # Data -text error
          if isDataText
            $theErrorField.val("").attr "placeholder", errorsArray[1].val

          # Data -number error
          if isDataNumber
            $theErrorField.val("").attr "placeholder", errorsArray[2].val

          # Perform a switch between value and placeholder
          # or vice versa, depends on the value inside the
          # input field
          setTimeout ->
            if theErrorFieldValue?
              $theErrorField.val(theErrorFieldValue)
            else
              $theErrorField.attr "placeholder", theErrorFieldPlaceholder
          , settings.placeholderTimeout

          # Call a function to be submitted
          # when the form is not correctly
