Last active
January 27, 2016 17:58
-
-
Save kjohnson/ea448481c5c6ec2317fc 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() { | |
// On the Form Submission's field validaiton... | |
var submitChannel = Backbone.Radio.channel( 'submit' ); | |
this.listenTo( submitChannel, 'validate:field', this.validate ); | |
// on the Field's model value change... | |
var fieldsChannel = Backbone.Radio.channel( 'fields' ); | |
this.listenTo( fieldsChannel, 'change:modelValue', this.validate ); | |
}, | |
validate: function( model ) { | |
// Custom Validation Here... | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment