Validator.js 331 B

12345678910111213141516
  1. class Validator {
  2. beforeValidate({ model, json, options }) {
  3. model.$beforeValidate(null, json, options);
  4. }
  5. validate(args) {
  6. /* istanbul ignore next */
  7. throw new Error('not implemented');
  8. }
  9. afterValidate({ model, json, options }) {
  10. model.$afterValidate(json, options);
  11. }
  12. }
  13. module.exports = Validator;