 
   onOkEditEntry: (e) ->
     e.preventDefault()
-    if !@validate() then return
+    if !@valid() then return
     content = @$el.find('#entryContent').val()
     @modelBeingEdited.set('content', content)
     stateId = if @$el.find('#completed').prop('checked') then @controller.constants.closedStateId else @controller.constants.openedStateId

    e.preventDefault()
    @hide()

  validate: () ->
    @$el.validate(@validationRules)
    @$el.valid()

class EntryListView extends Backbone.View
  template: _.template($("#entryListTemplate").html())
  entries: null
  controller: null

      @$header.find("#showDone").addClass('doneNotShown')
      @$header.find("#showDone").removeClass('doneShown')

class ValidatableView extends Backbone.View
  valid: () ->
    @$form.validate(@validationRules)
    @$form.valid()

class ApplicationModel extends Backbone.Model

