Symptom: a validation does not start, starts too often, or a field is not revalidated after an error. You want to know when each call is sent.
Affected versions: 1.0.0.
Address: two separate calls
| Call | Trigger | Delay | DQE service |
|---|---|---|---|
| Suggestions | The customer types in the address line (at least 2 characters) | 600 ms after the last keystroke | SINGLEV |
| Validation | Form submission, if validation is still required for the address | Immediate | RNVP |
Validation is required again each time the customer edits an address field, and is no longer required once a suggestion is selected, depending on the validation mode.
Validation modes
The mode is set by the Business Manager site preference dqeAddressValidationMode. If the preference is absent, the default value is validate_on_manual_change.
| Mode | Behaviour |
|---|---|
validate_always | Validation on every submission. |
validate_on_manual_input | Validation only if no suggestion has been selected. |
validate_on_manual_change | After a suggestion is selected, no validation until the customer changes a field again. |
If a customer does not see validation on submit, first check the configured mode and whether a suggestion was selected.
Email and phone
| Event | Behaviour |
|---|---|
| The customer leaves the field after changing it | Immediate call, if the value is not empty. |
| The customer types | Call 2 seconds after the last keystroke, only if the field has already been changed once on the page. |
A call is not sent:
- if the value is identical to the last validated value;
- if a previous call is still in progress;
- if the value is empty;
- on the first pass, if the value does not match the expected format of the field.
The phone field ignores spaces when comparing values. If DQE returns a formatted number, that number becomes the reference value.
Form blocking
- An
invalidresponse disables the submit button and displays a message. - A
warnorvalidresponse does not block the form. - An error response does not block the form on the client side (see the article on the cartridge behaviour when the DQE API does not respond).
Good to know
- The last value sent is remembered even when DQE returned an error: the same email or phone number is not revalidated until the value changes.
- If validation of a field no longer reacts after a network problem, reload the page. If the issue persists, contact DQE support.
Verification
- Open the browser developer tools, Network tab, and filter on
DQE-. - Change an email field, then leave the field: a
DQE-ValidateEmailcall should be sent. - Type without leaving the field: no call is sent before the field has been left for the first time.
Related to