mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-13 13:35:30 -04:00
Fixed #1102
This commit is contained in:
parent
254c6ff7ba
commit
7a9928b0c5
2 changed files with 2 additions and 2 deletions
app
|
@ -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()
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue