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

Latest commit

 

History

History
28 lines (23 loc) · 666 Bytes

negative.md

File metadata and controls

28 lines (23 loc) · 666 Bytes

Negative

Validates if a number is lower than zero.

Valid values:

validator.negative().validate('-1.44');
validator.negative().validate(-1e-5);
validator.negative().validate(-10);

Invalid values:

validator.positive().validate(0);
validator.positive().validate(-0);
validator.negative().validate('');
validator.negative().validate(null);
validator.negative().validate(undefined);
validator.negative().validate('a');
validator.negative().validate('   ');
validator.negative().validate('Foo');
validator.negative().validate(16);
validator.negative().validate('156');
validator.negative().validate(123456);
validator.negative().validate(1e10);