refs #5250 eliminacion isEnabled
This commit is contained in:
parent
809c24f6cf
commit
4edb2463b8
|
@ -1,8 +1,7 @@
|
|||
module.exports = function(Self) {
|
||||
Self.validatesPresenceOf('text', isEnabled, {message: 'Description cannot be blank'});
|
||||
function isEnabled(err) {
|
||||
if (!this.text) err();
|
||||
}
|
||||
Self.validatesPresenceOf('text', {
|
||||
message: 'Description cannot be blank'
|
||||
});
|
||||
|
||||
Self.observe('before save', async function(ctx) {
|
||||
ctx.instance.created = new Date();
|
||||
|
|
Loading…
Reference in New Issue