Last active
January 27, 2016 18:29
-
-
Save kjohnson/49fe1187bd9ad823f275 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myCustomFieldController = Marionette.Object.extend( { | |
initialize: function() { | |
// ... | |
}, | |
validate: function( model ) { | |
// ... | |
// Do Validation Here... | |
// ... | |
// If validation passes... | |
var modelID = model.get( 'id' ); | |
var errorID = 'custom-field-error'; | |
var fieldsChannel = Backbone.Radio.channel( 'fields' ); | |
// Add Error | |
fieldsChannel.request( 'remove:error', modelID, errorID ); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment