Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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