Skip to content

Commit

Permalink
add strict mode small documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
aliaksandr-master committed Jan 14, 2015
1 parent 796521c commit c415fc2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,19 @@ sc1.field('some').optional();
sc1.optional('some');
```

#### Schema::strict( [flag] )
Add strict mode flag.<br>
If Strict mode was enabled - in this object excess fields can't be pass successfully the validation.
```js
var schema = new Schema();
schema.strict();
// eq
schema.strict(true);

// if you want to disable strict mode of this schema/field
schema.strict(false);
```

## Schema File Loader
Load your schema from YAML (or JS) file.

Expand Down

0 comments on commit c415fc2

Please sign in to comment.