[GH-ISSUE #795] Parameter validation requiring web access #665

Open
opened 2026-02-28 01:26:28 +03:00 by kerem · 3 comments
Owner

Originally created by @Llaves on GitHub (Dec 29, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/795

This issue asks the question about validating user supplied parameters and explains how this can be done directly in the html without altering WiFiManager code. What about the case where the validation of the custom parameter requires accessing the web - e.g., validating a password? I don't see how this can be handled in the html, in part because the ESP still hasn't connected to the access point. Callback code can handle the validation, but how is the ESP switched back to act as an access point and html sent to the user device to inform the user of the validation failure?

Originally created by @Llaves on GitHub (Dec 29, 2018). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/795 This [issue](https://github.com/tzapu/WiFiManager/issues/736) asks the question about validating user supplied parameters and explains how this can be done directly in the html without altering WiFiManager code. What about the case where the validation of the custom parameter requires accessing the web - e.g., validating a password? I don't see how this can be handled in the html, in part because the ESP still hasn't connected to the access point. Callback code can handle the validation, but how is the ESP switched back to act as an access point and html sent to the user device to inform the user of the validation failure?
Author
Owner

@tablatronix commented on GitHub (Dec 30, 2018):

It can be done in non ap mode, when accessing on network.

<!-- gh-comment-id:450533416 --> @tablatronix commented on GitHub (Dec 30, 2018): It can be done in non ap mode, when accessing on network.
Author
Owner

@Llaves commented on GitHub (Dec 30, 2018):

Yes, I understand that in non-AP mode the code can access the web and validate the parameter. The part I'm unclear on is how, when returning to AP mode to access the web page sent to the user to inform them the parameter failed to validate and to re-enter the parameter. I expect others have faced this issue and I'm looking for an example or a suggestion of best practices for handling this use case.

<!-- gh-comment-id:450537976 --> @Llaves commented on GitHub (Dec 30, 2018): Yes, I understand that in non-AP mode the code can access the web and validate the parameter. The part I'm unclear on is how, when returning to AP mode to access the web page sent to the user to inform them the parameter failed to validate and to re-enter the parameter. I expect others have faced this issue and I'm looking for an example or a suggestion of best practices for handling this use case.
Author
Owner

@tablatronix commented on GitHub (Dec 30, 2018):

Yeah like i said , The only option is to use webportal mode in sta mode, no way you are going to be switching back and forth , makes no sense. This is only available in development branch.

<!-- gh-comment-id:450542297 --> @tablatronix commented on GitHub (Dec 30, 2018): Yeah like i said , The only option is to use webportal mode in sta mode, no way you are going to be switching back and forth , makes no sense. This is only available in development branch.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#665
No description provided.