handle incorrect phone number error

This commit is contained in:
Lei PAN
2024-02-23 19:03:06 +01:00
parent 99953c758f
commit 16788745f4
3 changed files with 9 additions and 0 deletions
+4
View File
@@ -19,6 +19,7 @@ const MESSAGE_URL_VALIDATION_FR = "Vous recevrez un email de validation"
const MESSAGE_URL_VALIDATION_FR_2 = "Merci de votre intérêt pour notre Maison"
const SSL_CERT_ERROR = " Votre connexion n'est pas privée"
const MESSAGE_URL_VALIDATION_EN = "Please click on the link we sent by email"
const WRONG_PHONE_NUMBER = "Veuillez renseigner vote numéro de téléphone"
const CHOOSE_POSITION_GOOGLE_FR = " Choisir la position pour les résultats de recherche"
const CAPTCHA_ERROR_MESSAGE = "Error verifying captcha, please try again"
const CAPTCHA_ERROR_MESSAGE_FR = "La vérification du captcha a échoué"
@@ -109,6 +110,9 @@ class OCRChecker {
} else if (result.includes(SSL_CERT_ERROR)) {
await this.deleteFile(fileName)
return OCRResult.SSL_CERT_ERROR
} else if (result.includes(WRONG_PHONE_NUMBER)) {
await this.deleteFile(fileName)
return OCRResult.WRONG_PHONE_NUMBER
} else if (result.includes(MESSAGE_FILL_FIELD_FR) || result.includes(MESSAGE_FILL_FIELD_FR_2) || result.includes(MESSAGE_FILL_FIELD_FR_3) || result.includes(MESSAGE_FILL_FIELD_FR_4) || result.includes(MESSAGE_FILL_FIELD_FR_5) || result.includes(MESSAGE_FILL_FIELD_FR_6)) {
await this.deleteFile(fileName)
return OCRResult.FILL_FIELD