#5878 - FiscalData validations #1851
|
@ -17,17 +17,13 @@ module.exports = Self => {
|
||||||
message: 'The social name cannot be empty'
|
message: 'The social name cannot be empty'
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this.city) {
|
Self.validatesPresenceOf('city', {
|
||||||
Self.validatesPresenceOf('city', {
|
message: 'City cannot be empty'
|
||||||
message: 'City cannot be empty'
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.nif) {
|
Self.validatesPresenceOf('nif', {
|
||||||
Self.validatesPresenceOf('nif', {
|
message: 'The nif cannot be empty'
|
||||||
message: 'The nif cannot be empty'
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
Self.validatesUniquenessOf('nif', {
|
Self.validatesUniquenessOf('nif', {
|
||||||
message: 'TIN must be unique'
|
message: 'TIN must be unique'
|
||||||
|
|
Loading…
Reference in New Issue