This commit is contained in:
parent
20e894257d
commit
f3bf0b7432
|
@ -379,5 +379,6 @@
|
||||||
"The entry does not have stickers": "La entrada no tiene etiquetas",
|
"The entry does not have stickers": "La entrada no tiene etiquetas",
|
||||||
"Too many records": "Demasiados registros",
|
"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",
|
"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) {
|
module.exports = function(Self) {
|
||||||
Self.validate('text', isEnabled, {message: 'Description cannot be blank'});
|
Self.validate('text', function(err) {
|
||||||
function isEnabled(err) {
|
|
||||||
if (!this.text) 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) {
|
Self.observe('before save', function(ctx, next) {
|
||||||
ctx.instance.created = Date();
|
ctx.instance.created = Date();
|
||||||
|
|
Loading…
Reference in New Issue