Skip to content

Instantly share code, notes, and snippets.

@olivernn
Created September 23, 2010 08:50
Show Gist options
  • Save olivernn/593354 to your computer and use it in GitHub Desktop.
Save olivernn/593354 to your computer and use it in GitHub Desktop.
Post('post', {}, {
validatesPresenceOf: ['title', 'body'],
validatesLengthOf: [{attr: 'title', min: 20}, { attr: 'body', max: 2000 }]
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment