Skip to content

Commit

Permalink
Update the README and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
chriso committed Feb 21, 2016
1 parent 396f2be commit 34779dc
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
#### HEAD

- Migrate to ES6
([#496](https://github.com/chriso/validator.js/pull/496))
- Break the library up so that individual functions can be imported
([#496](https://github.com/chriso/validator.js/pull/496))
- Remove auto-coercion of input to a string
([#496](https://github.com/chriso/validator.js/pull/496))
- Remove the `extend()` function
([#496](https://github.com/chriso/validator.js/pull/496))
- Added Arabic locales to `isAlpha()` and `isAlphanumeric()`
([#496](https://github.com/chriso/validator.js/pull/496#issuecomment-184781730))
- Fix validation of very large base64 strings
([#503](https://github.com/chriso/validator.js/pull/503))

Expand Down
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ var validator = require('validator');
validator.isEmail('foo@bar.com'); //=> true
```

#### ES6

```javascript
import validator from 'validator';
```

Or, import only a subset of the library:

```javascript
import isEmail from 'validator/lib/isEmail';
```

### Client-side usage

The library can be loaded either as a standalone script, or through an [AMD][amd]-compatible loader
Expand All @@ -33,12 +45,10 @@ $ bower install validator-js

### Strings only

This library validates and sanitizes strings only.

**Repeat: this library validates and sanitizes strings only**.
**This library validates and sanitizes strings only.**

Passing input that isn't a string will be an error in an upcoming release.
If you're not sure if your input is a string, coerce it using `input + ''`.
Passing anything other than a string is an error.

### Validators

Expand Down Expand Up @@ -168,4 +178,4 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
[bower]: http://bower.io/

[mongoid]: http://docs.mongodb.org/manual/reference/object-id/
[ISIN]: https://en.wikipedia.org/wiki/International_Securities_Identification_Number
[ISIN]: https://en.wikipedia.org/wiki/International_Securities_Identification_Number

0 comments on commit 34779dc

Please sign in to comment.