Skip to content

Commit

Permalink
Minor layout fixes in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
thedersen committed Jul 19, 2012
1 parent 112ae30 commit 9277e0c
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions README.md
@@ -1,6 +1,9 @@
# Backbone.Validation v0.6.0 # Backbone.Validation v0.6.0


A validation plugin for [Backbone.js](http://documentcloud.github.com/backbone) that validates both your model as well as form input. Inspired by [Backbone.ModelBinding](http://github.com/derickbailey/backbone.modelbinding), and another implementation with a slightly different approach than mine at [Backbone.Validations](http://github.com/n-time/backbone.validations). A validation plugin for [Backbone.js](http://documentcloud.github.com/backbone) that validates both your model as well as form input.

<iframe class="github-btn" src="http://markdotto.github.com/github-buttons/github-btn.html?user=thedersen&repo=backbone.validation&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="112px" height="20px"></iframe>
<iframe class="github-btn" src="http://markdotto.github.com/github-buttons/github-btn.html?user=thedersen&repo=backbone.validation&type=fork&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="112px" height="20px"></iframe>


## Introduction ## Introduction


Expand Down Expand Up @@ -681,12 +684,14 @@ If you need to validate entire model (both attributes that has been set or not)


By default, if you configure a validator for an attribute, it is considered required. However, if you want to allow empty values and still validate when something is entered, add required: false in addition to other validators. By default, if you configure a validator for an attribute, it is considered required. However, if you want to allow empty values and still validate when something is entered, add required: false in addition to other validators.


validation: { ```js
value: { validation: {
min: 1, value: {
required: false min: 1,
} required: false
} }
}
```


### I there an elegant way to display the error message that is put into the data-error attribute? ### I there an elegant way to display the error message that is put into the data-error attribute?


Expand Down Expand Up @@ -809,6 +814,10 @@ Basic behaviour:


* Initial release * Initial release


## Inspiration

Backbone.Validation is inspired by [Backbone.ModelBinding](http://github.com/derickbailey/backbone.modelbinding), and another implementation with a slightly different approach than mine at [Backbone.Validations](http://github.com/n-time/backbone.validations).

## License ## License


http://thedersen.mit-license.org/ http://thedersen.mit-license.org/

0 comments on commit 9277e0c

Please sign in to comment.