Messages
Here is a list of all parameters that are accepted in the messages object present in the Document Detector options.
The messages
object is optional. If you don't pass it, the SDK will use the default messages based on the language
parameter (the default values listed below are for the English language).
Parameter
Type
general
Customization of displayed general messages.
capture
Customization of displayed messages ("manual" and "automatic" capture modes).
upload
Customization of displayed messages (“upload” capture mode).
General
Parameter
Type
Default Value
wait
Loading message.
string
"Wait..."
errors.poorQuality
Message displayed when the captured image is with poor quality.
string
"The quality of the capture was not good. Make sure you are in a bright environment and try again."
errors.documentNotFound
Message displayed when the document is not found.
string
"Oops, it seems that this document is not supported."
errors.invalidDocument
Message displayed when the document is not supported.
Example: "Oops, this document is not "Front of RG""
string
"Oops, this document is not "${expectedDocumentLabel}""
errors.generic
Generic error message.
string
"Oops, something went wrong, please try again"
Capture
Parameter
Type
Default Value
title
Capture title.
string
The expected document label (e.g., "Front of RG")
errors.captureFailed
Message displayed when the capture fails.
string
"Oops! We had a problem processing your image."
Upload
Parameter
Type
Default Value
title
Customization of upload screen title.
string
"Allow and attach document"
details
Customization of message below the upload screen title.
string
"In order for us to proceed with the process, please enable access to your photos and attach your document"
button
Customization of the upload button text.
string
"Allow"
success
Customization of title displayed on the screen when the file was sent successfully.
string
"Photo sent successfully!"
errors.generic.title
Customization of title displayed on the screen when a generic error occurred in the upload process.
string
"Error sending file"
errors.generic.details
Customization of message below the title displayed on the screen when a generic error occurred in the upload process.
string
"Oops, something went wrong when sending your file. Please try again."
errors.generic.button
Customization of button text to perform the upload again.
string
"Try again"
errors.invalidFileFormat.title
Customization of title displayed on the screen when an error occurred in the format of the sent file.
string
"Invalid format"
errors.invalidFileFormat.details
Customization of message below the title displayed on the screen when an error occurred in the format of the sent file.
string
"It looks like your photo format is not supported. Try resending using JPG, PNG or PDF formats."
Last updated