Skip to content

Instantly share code, notes, and snippets.

@kjohnson
Last active January 27, 2016 18:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kjohnson/60044fe198ce8e7aaee1 to your computer and use it in GitHub Desktop.
Save kjohnson/60044fe198ce8e7aaee1 to your computer and use it in GitHub Desktop.
var myCustomFieldController = Marionette.Object.extend( {
initialize: function() {
// ....
},
validate: function( model ) {
// Check the field type.
if( 'custom' != model.get( 'type' ) ) return;
// Get the field value.
var fieldValue = model.get( 'value' );
// Do Validation Here...
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment