Renamed $errorMessageArray to $errorMessages.