<commit_before>Stonewall
=========

A asynchronous validation framework with tight integration to Backbone and Rivets.

## Introduction

Stonewall is a simple Javascript validation framework. The goal of the framework is to provide a validation library that doesn't get in your way. But at the same time, Stonewall provides features that many validation frameworks are missing. For instance, Stonewall includes asynchronous validation by default, no plugins required. This means you can have validation rules like 'check if username is registered already.' Stonewall is in its infancy, so there may be bugs, but everything is thoroughly tested, and the framework is already being used in production on a number of sites.

## Download

[Stonewall-0.1.0.js](https://raw.github.com/britco/stonewall/master/dist/Stonewall-0.1.0.js)

## Dependencies
* [Underscore](http://underscorejs.org/)
* [jQuery](http://jquery.com/)

## Docs
* [Methods](https://github.com/britco/stonewall/blob/master/docs/methods.md)

## Basic Setup

This information should help you get up and going with Stonewall. First download the source code, and include in your page.

	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
	<script type="text/javascript" src="lib/underscore.js"></script>
	<script type="text/javascript" src="lib/Stonewall-0.1.0.js"></script>

### Setting up rules

Rulesets are easy to create. Simply create an object with the properties as the attribute names, and the values as the rules / options. For example:<commit_msg>fixed a typo<commit_after>Stonewall
=========

An asynchronous validation framework with tight integration to Backbone and Rivets.

## Introduction

Stonewall is a simple Javascript validation framework. The goal of the framework is to provide a validation library that doesn't get in your way. But at the same time, Stonewall provides features that many validation frameworks are missing. For instance, Stonewall includes asynchronous validation by default, no plugins required. This means you can have validation rules like 'check if username is registered already.' Stonewall is in its infancy, so there may be bugs, but everything is thoroughly tested, and the framework is already being used in production on a number of sites.

## Download

[Stonewall-0.1.0.js](https://raw.github.com/britco/stonewall/master/dist/Stonewall-0.1.0.js)

## Dependencies
* [Underscore](http://underscorejs.org/)
* [jQuery](http://jquery.com/)

## Docs
* [Methods](https://github.com/britco/stonewall/blob/master/docs/methods.md)

## Basic Setup

This information should help you get up and going with Stonewall. First download the source code, and include in your page.

	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
	<script type="text/javascript" src="lib/underscore.js"></script>
	<script type="text/javascript" src="lib/Stonewall-0.1.0.js"></script>

### Setting up rules

Rulesets are easy to create. Simply create an object with the properties as the attribute names, and the values as the rules / options. For example:
{'fraction_non_alphanumeric': 0.10399492707672796, 'fraction_numerical': 0.007609384908053266, 'mean_word_length': 4.810313075506445, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4833002', 'n_tokens_mistral': 874, 'n_tokens_neox': 829, 'n_words': 345}