The following code ensures that an address ID CANNOT be used if it is already in use by another address in the customer’s address book. There is a problem with the code. The error message for an invalid address ID is never shown to the user on the form field.
How should the Digital Developer resolve this issue so that the error message is displayed on the address ID form field?
A. addressForm.invalidateFormElement("addressid");
B. addressForm.addresssid.invalidateFormElement = true;
C. addressForm.invalidateFormElement(addressForm.addressid);
D. addressForm.addresssid.invalidateFormElement();
Definitely D
There is only two options for invalidateFormElement() or invalidateFormElement(“Error string”) per documentation
Hello! Wouldn’t option D be the correct answer here? The parameter that the method “invalidateFormElement()” receives is the error message.