Skip to content

Instantly share code, notes, and snippets.

@cloudhead
Forked from ELLIOTTCABLE/gist:402657
Created May 16, 2010 04:51
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 cloudhead/402661 to your computer and use it in GitHub Desktop.
Save cloudhead/402661 to your computer and use it in GitHub Desktop.
properties: {
title: {
type: 'string',
conditional: {
optional: {
value: true,
when: function () { // The 'optional' attribute only takes effect if this function returns true
return !this.published; // So the title is only optional if the article hasn't been published.
}
},
maxLength: { value: 140, when: function () {} }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment