Skip to content
This repository has been archived by the owner on Oct 20, 2021. It is now read-only.

Latest commit

 

History

History
24 lines (19 loc) · 556 Bytes

between.md

File metadata and controls

24 lines (19 loc) · 556 Bytes

Between

Validates lengths.

Valid values:

validator.between(1).validate('foo'));
validator.between(100).validate(100));
validator.between(100, 200, false).validate(150));
validator.between(1).validate({foo: 'bar'}));
validator.between(1).validate([1]));

Invalid values:

validator.between(5).validate('foo'));
validator.between(3, 5, false).validate('foo'));
validator.between(100).validate(50));
validator.between(100, 200, false).validate(100));
validator.between(2).validate({foo: 'bar'}));
validator.between(2).validate([1]));