Summary of What Needs to be Done
src/utils/validationApi.js — after all retry attempts are exhausted (network errors, timeouts, or 5xx errors), requestValidation returns:
return createValidationResponse(true, "", { error: lastError, ... });
createValidationResponse(true, "") sets isValid: true and message: "". This incorrectly signals to form validators that the input is valid when the validation actually failed. The skippedDueToError: true flag in extras is insufficient — callers check isValid first.
Changes
Change the final return after all retries fail to createValidationResponse(false, networkMessage, { error: lastError, isTimeout, isNetworkError }). This correctly marks the validation as failed and surfaces the appropriate error message to the user.
Impact
- Incorrect validation behavior: Users see a green success state even when the API was unreachable, timeouts occurred, or the server returned 5xx errors. This could allow invalid data to pass through form validation silently.
- Security: Validation that appears to pass but actually failed could bypass security checks (e.g., username uniqueness validation on registration forms).
Please assign this task to me.
Summary of What Needs to be Done
src/utils/validationApi.js— after all retry attempts are exhausted (network errors, timeouts, or 5xx errors),requestValidationreturns:createValidationResponse(true, "")setsisValid: trueandmessage: "". This incorrectly signals to form validators that the input is valid when the validation actually failed. TheskippedDueToError: trueflag in extras is insufficient — callers checkisValidfirst.Changes
Change the final return after all retries fail to
createValidationResponse(false, networkMessage, { error: lastError, isTimeout, isNetworkError }). This correctly marks the validation as failed and surfaces the appropriate error message to the user.Impact
Please assign this task to me.