eivindfjeldstad/validate — pull request #3 by Raynos (2012-06-02 13:15:39+00:00)
Title: better support for array checking and array length checking

This is iffy.

It works but there may be a more elegant way.

## Motivation

### For the array property

```
var schema = {
foo: {
array: true,
type: "string"
}
}
```

`validate(schema, { foo: "bar" })` fails

`validate(schema, { foo: ["bar"] })` succeeds

### For the array length properties

```
var schema = {
foos: {
type: "string",
array: true,
arrayMinLen: 1
}
}
```

`validate(schema, { foos: [] })` fails

`validate(schema, { foos: ["foo"] })` succeeds