refs #5858 perf: revert changes
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Javier Segarra 2023-12-11 07:54:37 +01:00
parent f9ea77fa39
commit c8ca855ba9
1 changed files with 10 additions and 6 deletions

View File

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