231801_test_to_master #1519
|
@ -1,8 +1,7 @@
|
||||||
module.exports = function(Self) {
|
module.exports = function(Self) {
|
||||||
Self.validatesPresenceOf('text', isEnabled, {message: 'Description cannot be blank'});
|
Self.validatesPresenceOf('text', {
|
||||||
function isEnabled(err) {
|
message: 'Description cannot be blank'
|
||||||
if (!this.text) err();
|
});
|
||||||
}
|
|
||||||
|
|
||||||
Self.observe('before save', async function(ctx) {
|
Self.observe('before save', async function(ctx) {
|
||||||
ctx.instance.created = new Date();
|
ctx.instance.created = new Date();
|
||||||
|
|
Loading…
Reference in New Issue