Skip to content

Instantly share code, notes, and snippets.

@mergeweb
Last active September 10, 2015 13:20
Embed
What would you like to do?
this.beforeSave()
.then(this.send.bind(this))
.then(this.success.bind(this))
.then(this.afterSave.bind(this))
// Error validation shown in page
.catch(function(error){
// HERE IS WHERE I WANT THE DEFAULT HTML5 ERRORS TO SHOW
// This will be called if any of the above promises throw an error
})
.then(this.enable_save.bind(this))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment