errorMessage

val errorMessage: String

Get the error message that is displayed if displayErrors is true. If displayErrors is false, this can be used to display errors in your app with your own UI (e.g. in a dialog)


Important:

Error messages for a field are only generated if the field has been edited by the user and focus has changed to another field. That means isValid could be false but still not have an error message


Error messages can be customized by defining the following string resources in your app:

olopay_invalid_card_number_error
olopay_empty_card_number_error
olopay_invalid_expiration_error
olopay_empty_expiration_error
olopay_invalid_cvc_error
olopay_empty_cvc_error
olopay_empty_postal_code_error
olopay_invalid_postal_code_error
olopay_invalid_card_details_error