16 lines
424 B
JavaScript
16 lines
424 B
JavaScript
|
module.exports = function(Self) {
|
||
|
require('../methods/packaging/crudTicketPackaging')(Self);
|
||
|
|
||
|
Self.validateBinded('quantity', validateQuantity, {
|
||
|
message: 'Quantity cannot be zero',
|
||
|
allowNull: false,
|
||
|
allowBlank: false
|
||
|
});
|
||
|
|
||
|
function validateQuantity(quantity) {
|
||
|
return quantity != 0;
|
||
|
}
|
||
|
|
||
|
Self.validatesPresenceOf('packagingFk', {message: 'Package cannot be blank'});
|
||
|
};
|