removed validatesPresenceOf() from client and greuge to add required: true on their models
This commit is contained in:
parent
5f1c0a0e5a
commit
bb06a54df2
|
@ -24,9 +24,6 @@ module.exports = function(Self) {
|
|||
Self.validatesUniquenessOf('fi', {
|
||||
message: 'El NIF/CIF debe ser único'
|
||||
});
|
||||
Self.validatesPresenceOf('socialName', {
|
||||
message: 'Debe especificarse la razón social'
|
||||
});
|
||||
Self.validatesUniquenessOf('socialName', {
|
||||
message: 'La razón social debe ser única'
|
||||
});
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
"description": "Fiscal indentifier"
|
||||
},
|
||||
"socialName": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"contact": {
|
||||
"type": "string"
|
||||
|
|
|
@ -2,9 +2,6 @@ module.exports = function(Self) {
|
|||
require('../methods/greuge/filter.js')(Self);
|
||||
require('../methods/greuge/totalGreuge.js')(Self);
|
||||
|
||||
Self.validatesPresenceOf('description', 'amount', 'greugeTypeFk', {
|
||||
message: 'Este campo es obligatorio'
|
||||
});
|
||||
Self.validatesLengthOf('description', {
|
||||
max: 45,
|
||||
message: 'La description debe tener maximo 45 caracteres'
|
||||
|
|
|
@ -14,10 +14,12 @@
|
|||
"description": "Identifier"
|
||||
},
|
||||
"description": {
|
||||
"type": "String"
|
||||
"type": "String",
|
||||
"required": true
|
||||
},
|
||||
"amount": {
|
||||
"type": "Number"
|
||||
"type": "Number",
|
||||
"required": true
|
||||
},
|
||||
"shipped": {
|
||||
"type": "date"
|
||||
|
@ -35,7 +37,8 @@
|
|||
"greugeType": {
|
||||
"type": "belongsTo",
|
||||
"model": "GreugeType",
|
||||
"foreignKey": "greugeTypeFk"
|
||||
"foreignKey": "greugeTypeFk",
|
||||
"required": true
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue