refs #5878 feat: remove conditions

This commit is contained in:
Javier Segarra 2023-11-27 15:06:55 +01:00
parent aa5218fb1a
commit f09e249348
1 changed files with 6 additions and 10 deletions

View File

@ -17,17 +17,13 @@ module.exports = Self => {
message: 'The social name cannot be empty'
});
if (this.city) {
Self.validatesPresenceOf('city', {
message: 'City cannot be empty'
});
}
Self.validatesPresenceOf('city', {
message: 'City cannot be empty'
});
if (this.nif) {
Self.validatesPresenceOf('nif', {
message: 'The nif cannot be empty'
});
}
Self.validatesPresenceOf('nif', {
message: 'The nif cannot be empty'
});
Self.validatesUniquenessOf('nif', {
message: 'TIN must be unique'