This commit is contained in:
parent
20e894257d
commit
f3bf0b7432
|
@ -379,5 +379,6 @@
|
|||
"The entry does not have stickers": "La entrada no tiene etiquetas",
|
||||
"Too many records": "Demasiados registros",
|
||||
"This buyer has already made a reservation for this date": "Este comprador ya ha hecho una reserva para esta fecha",
|
||||
"No valid travel thermograph found": "No se encontró un termógrafo válido"
|
||||
}
|
||||
"No valid travel thermograph found": "No se encontró un termógrafo válido",
|
||||
"type cannot be blank": "Se debe rellenar el tipo"
|
||||
}
|
|
@ -1,8 +1,11 @@
|
|||
module.exports = function(Self) {
|
||||
Self.validate('text', isEnabled, {message: 'Description cannot be blank'});
|
||||
function isEnabled(err) {
|
||||
Self.validate('text', function(err) {
|
||||
if (!this.text) err();
|
||||
}
|
||||
}, {message: 'Description cannot be blank'});
|
||||
|
||||
Self.validate('observationTypeFk', function(err) {
|
||||
if (!this.observationTypeFk) err();
|
||||
}, {message: 'type cannot be blank'});
|
||||
|
||||
Self.observe('before save', function(ctx, next) {
|
||||
ctx.instance.created = Date();
|
||||
|
|
Loading…
Reference in New Issue