refs #5072 email validation added
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alexandre Riera 2023-01-30 08:30:39 +01:00
parent ce1bdaec17
commit 7e5f50e637
3 changed files with 18 additions and 1 deletions

View File

@ -0,0 +1,6 @@
UPDATE vn.client
SET isToBeMailed = FALSE
WHERE
mailAddress is NULL
AND email is NULL
AND isToBeMailed = TRUE;

View File

@ -259,5 +259,6 @@
"Try again": "Vuelve a intentarlo",
"Aplicación bloqueada por el usuario 9": "Aplicación bloqueada por el usuario 9",
"Failed to upload file": "Error al subir archivo",
"The DOCUWARE PDF document does not exists": "The DOCUWARE PDF document does not exists"
"The DOCUWARE PDF document does not exists": "The DOCUWARE PDF document does not exists",
"There is no assigned email for this client": "No hay correo asignado para este cliente"
}

View File

@ -141,6 +141,16 @@ module.exports = Self => {
done();
}
Self.validateAsync('isToBeMailed', isToBeMailed, {
message: 'There is no assigned email for this client'
});
function isToBeMailed(err, done) {
if (this.isToBeMailed == true && !this.email)
err();
done();
}
Self.validateAsync('defaultAddressFk', isActive,
{message: 'Unable to default a disabled consignee'}
);