 
     @state = KD.utils.extend @getInitialState(), state
 
+    @isInputValidMap = {}
+
     @initViews()
     @initEvents()
+
+
+  observeForm: ->
+
+    isVisible = (key) => @form.inputs[key]?.getOption('cssClass') isnt 'hidden'
+
+    Object.keys(@form.inputs).filter(isVisible).map (name) =>
+
+      input = @form.inputs[name]
+
+      @isInputValidMap[name] = no
+
+      input.on 'ValidationResult', (isValid) =>
+
+        @handleFormInputValidation name, isValid
+
+
+  handleFormInputValidation: (name, isValid) ->
+
+    @isInputValidMap[name] = isValid
+
+    formIsValid = yes
+    formIsValid = formIsValid and value  for own key, value of @isInputValidMap
+
+    @emit 'GotValidationResult', formIsValid
 
 
   initViews: ->

      partial  : pricePartial

    @form = @initForm()

    @existingCreditCardMessage = new KDCustomHTMLView
      cssClass : 'existing-cc-msg'

      cardNumber.setClass type.toLowerCase()

    @paypalForm.on 'PaypalTokenLoaded', @bound 'initPaypalClient'

    @on 'GotValidationResult', @bound 'handleValidationResult'


  handleValidationResult: (isValid) ->

    if isValid
    then @submitButton.enable()
    else @submitButton.disable()


  showValidationErrorsOnInputs: (error) ->
