-
-
Save cloudhead/402661 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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