salix/modules/agency/back/models/zone-event.js

10 lines
258 B
JavaScript
Raw Normal View History

2019-09-25 18:06:42 +00:00
module.exports = Self => {
function rangeValid(err) {
if (this.from && this.to && this.from >= this.to)
err();
}
Self.validate('rangeValid', rangeValid, {
message: `Start date should be lower than end date`
});
};