cermati/satpam

Run validation rule when some conditions are fulfilled

Closed this issue · 1 comments

Like switch that will turn on/off a validation rule.

e.g.

var fn = function () {
  return false;
};
var rules = [
  {name: 'required', condition: fn}
];

var result = satpam.validate(rules, {});
result.success === true; 

Closing this because we've implemented this feature #37