Last active
August 29, 2015 14:04
-
-
Save jakebellacera/02ca0b9a34e9232c4ca6 to your computer and use it in GitHub Desktop.
an example demoing a DSL for backbone objects
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
| class Something extends Backbone.Model | |
| is: ["validatable", "sortable"] | |
| validations: | |
| phoneNumber: | |
| required: | |
| message: "this is a custom message for when you're missing the phone number!" | |
| matches: /\d{10}/ | |
| sortable: | |
| by: "firstName" | |
| order: "desc" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment