This commit is contained in:
Scott Erickson 2014-05-30 13:57:21 -07:00
parent 254c6ff7ba
commit 7a9928b0c5
2 changed files with 2 additions and 2 deletions

View file

@ -34,5 +34,5 @@ module.exports.applyErrorsToForm = (el, errors) ->
module.exports.clearFormAlerts = (el) ->
$('.has-error', el).removeClass('has-error')
$('.alert', el).remove()
$('.alert.alert-danger', el).remove()
el.find('.help-block.error-help-block').remove()

View file

@ -63,7 +63,7 @@ class CocoModel extends Backbone.Model
schema: -> return @constructor.schema
validate: ->
result = tv4.validateMultiple(@attributes, @constructor.schema? or {})
result = tv4.validateMultiple(@attributes, @constructor.schema or {})
if result.errors?.length
console.log @, "got validate result with errors:", result
return result.errors unless result.valid