           @addSubView new ProfileTextView({}, account), '.invited-by .wrapper'
       else
         @$('.invited-by').addClass('hidden')
-
-  getEmailValidator: ->
-    container   : this
-    event       : "blur"
-    rules       :
-      required  : yes
-      email     : yes
-      available : (input, event)=>
-        return if event?.which is 9
-        input.setValidationResult "available", null
-        email = input.getValue()
-        if input.valid
-          # @email.loader.show()
-          KD.remote.api.JUser.emailAvailable email, (err, response)=>
-            # @email.loader.hide()
-            if err then warn err
-            else
-              if response
-                input.setValidationResult "available", null
-              else
-                input.setValidationResult "available", "Sorry, \"#{email}\" is already in use!"
-        return
-    messages    :
-      required  : "Please enter your email address."
-      email     : "That doesn't seem like a valid email address."
-  submitForm: (event) ->
-
-    # KDInputView doesn't give clear results with
-    # async results that's why we maintain those
-    # results manually in EMAIL_VALID and USERNAME_VALID
-    # at least for now - SY
-    if EMAIL_VALID and USERNAME_VALID and @username.input.valid and @email.input.valid
-      @submit event
-      return yes
-    else
-      @button.hideLoader()
-      @username.input.validate()
-      @email.input.validate()
-      return no
 
   pistachio:->
     """

    @button = new KDButtonView
      title         : buttonTitle or 'Create account'
      type          : 'submit'
      style         : "solid green medium"
      loader        : yes
      callback      : @bound 'submitForm'

    @invitationCode = new LoginInputView
      cssClass      : "hidden"
      inputOptions  :
        name        : "inviteCode"
        type        : 'hidden'

    @domain = new KDCustomHTMLView

            else
              input.setValidationResult "usernameCheck", null


  getEmailValidator: ->
    container   : this
    event       : 'blur'
    rules       :
      required  : yes
      email     : yes
      available : (input, event) =>
        return if event?.which is 9
        input.setValidationResult 'available', null
        email = input.getValue()
        if input.valid
          # @email.loader.show()
          KD.remote.api.JUser.emailAvailable email, (err, response)=>
            # @email.loader.hide()
            if err then warn err
            else
              if response
                input.setValidationResult "available", null
              else
                input.setValidationResult "available", "Sorry, \"#{email}\" is already in use!"
        return
    messages    :
      required  : 'Please enter your email address.'
      email     : 'That doesn\'t seem like a valid email address.'


  submitForm: (event) ->

    # KDInputView doesn't give clear results with
    # async results that's why we maintain those
    # results manually in EMAIL_VALID and USERNAME_VALID
    # at least for now - SY
    if EMAIL_VALID and USERNAME_VALID and @username.input.valid and @email.input.valid
      @submit event
      return yes
    else
      @button.hideLoader()
      @username.input.validate()
      @email.input.validate()
      return no


  viewAppended:->

    super
