Approvejs Versions Save

A simple JavaScript validation library that doesn't interfere

v1.1.0

7 years ago

New tests added:

time

Checks if the value is a valid string representing time in a 24 hour format (hh:mm:ss).

Parameters: none

Result: default

Message: '{title} is not a valid time'

Example:
var rule = {
    time: true
};
var result = approve.value('12:25:30', rule);

date

Checks if the value is a valid string representing a date (YYYY[/-]MM[-/]DD).

Parameters: none

Result: default

Message: '{title} is not a valid date'

Example:
var rule = {
    date: true
};
var result = approve.value('2016-10-01', rule);

truthy

Checks if the value is truthy ('Yes', '1', 'true', 'ok[ay]').

Parameters: none

Result: default

Message: '{title} is not valid'

Example:
var rule = {
    truthy: true
};
var result = approve.value('Yes', rule);

falsy

Checks if the value is not truthy ('No', '0', 'false').

Parameters: none

Result: default

Message: '{title} is not valid'

Example:
var rule = {
    falsy: true
};
var result = approve.value('No', rule);

v1.0.4

7 years ago

Improved range. Now checks both string length and number value.

v1.0.3

7 years ago
  • Added additional test for multiple tests
  • Moved setting of value title to outside of testing loop

v1.0.2

7 years ago

Improved IP test - now also supports CIDR notation

v1.0.1

7 years ago

Improved credit card test - Now using Luhn algorithm.

v1.0.0

7 years ago
  1. Renamed strength test result properties to make more sense.
  2. Moved strength test result properties from nested score object to root of result.
  3. Now following semantic versioning.

Please read upgrade guide.

v0.0.6

7 years ago

Improved cyclomatic complexity down to 8 Leaner methods Added gulp-jshint for linting

v0.0.5

7 years ago

Added mocha for testing and removed jsmine Added to Travis-CI Published Node.js package

v0.0.4

7 years ago

Updated documentation Updated comments Removed old configure method Added test config handling

v0.0.3

7 years ago

Improved error message formatting Commented all code Added JSDoc documentation