nealstewart / backbone.validations

Declarative, HTML5 Attribute-Inspired Validations for Backbone
301 stars 37 forks source link

Contributing examples #10

Open tnine opened 12 years ago

tnine commented 12 years ago

Hi mate, First off thanks for publishing this framework! Second, I would like to contribute some additional documentation to answer questions I have. (sorry to file an issue, I wasn't able to message you).

Code is here.

https://gist.github.com/94a1f7ec13c29b1f3913

First, how can I mix your plugin with custom logic. I.E. registration date > now -13 years, and password1 == password2?

Second, how can I iterate over the attributes, and their validation errors? "registration.js" line 84.

I'll update the readme to reflect these examples. I apologize in advance if these are simple questions. I perform a lot of infrastructure framework and do very little on javascript.

Thanks, Todd

nealstewart commented 12 years ago

Hey man. Yeah, some examples aren't a bad idea. I'll throw together some quick ones while I'm dealing with the other open issue.