 @Meshweaver ||= {}
+
+defaultOptions =
+  saveExistingOnChange: true
 
 class @Meshweaver.ValidatedView
   constructor: (self, options) ->
     @self = self
-    options ||= {}
-    @saveExistingOnChange = options.saveExistingOnChange ?= true
-    @requireUiBinding = options.requireUiBinding ?= true
+    @options = _.extend({}, defaultOptions, options)
     @statusRowClass = '.row-status'
 
   bindUIElements: ->

    @self.model.set @modelFromInputs()
    @self.trigger 'input-change', e

    if !@self.model.isNew() and @saveExistingOnChange
      @persistModel()
      return


  configureValidation: =>
    Meshweaver.Validation.bind @self,
      valid: (view, attr) =>
        uiBind = view.uiError?[attr] || view.ui?[attr]
        return unless uiBind?
        uiBind.toggleClass('input-validation-error', false) if uiBind
        $item = @ensureValidationSummaryItem attr
        $item.toggleClass "hide", true
      invalid: (view, attr, error) =>
        uiBind = view.uiError?[attr] || view.ui?[attr]
        return unless uiBind?
        uiBind.toggleClass('input-validation-error', true) if uiBind
