Commit d741d85f authored by Eric Duminil's avatar Eric Duminil
Browse files

Slightly modified example

parent 92b9b904
......@@ -53,7 +53,6 @@ const char wifiInitialApPassword[] = "smrtTHNG8266";
void handleRoot();
// -- Callback methods.
void configSaved();
bool formValidator(iotwebconf::WebRequestWrapper* webRequestWrapper);
DNSServer dnsServer;
WebServer server(80);
......@@ -136,7 +135,6 @@ void setup()
iotWebConf.addParameterGroup(&group1);
iotWebConf.addParameterGroup(&group2);
iotWebConf.setConfigSavedCallback(&configSaved);
iotWebConf.setFormValidator(&formValidator);
iotWebConf.getApTimeoutParameter()->visible = true;
// -- Initializing the configuration.
......@@ -200,20 +198,3 @@ void configSaved()
{
Serial.println("Configuration was updated.");
}
bool formValidator(iotwebconf::WebRequestWrapper* webRequestWrapper)
{
Serial.println("Validating form.");
bool valid = true;
/*
int l = webRequestWrapper->arg(stringParam.getId()).length();
if (l < 3)
{
stringParam.errorMessage = "Please provide at least 3 characters for this test!";
valid = false;
}
*/
return valid;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment