mirror of
https://github.com/s00500/ESPUI.git
synced 2025-07-04 11:20:19 +00:00
Allow Max control to add maxlength to text input. Update docs.
This commit is contained in:
11
README.md
11
README.md
@ -267,6 +267,17 @@ The textinput works very similar like the number input but with a string. You
|
||||
can enter a String into it and when you are done with your change it is sent to
|
||||
the ESP.
|
||||
|
||||
If you attach a Max control to the text input then a max length will be applied
|
||||
to the control.
|
||||
|
||||
```
|
||||
text = ESPUI.text("Label", callback, ControlColor::Dark, "Initial value");
|
||||
ESPUI.addControl(ControlType::Max, "", "32", ControlColor::None, text);
|
||||
```
|
||||
|
||||
However even with a set maximum length, user input should still be validated
|
||||
because it is easy to bypass client-side checks.
|
||||
|
||||
#### Graph
|
||||
|
||||

|
||||
|
Reference in New Issue
Block a user