Commit 7b857cb
committed
[forms] Input and Input! handle maxlength again, use in demos
This commit:
c968305
introduced 2 changes in `Input` and `Input!`:
1. it removed the default 100 maxlength
2. it removed maxlength handling altogether
1 was harmful, users complained, it wasn't generic. 2 was useful,
because DOM inputs can have a larger value than the maxlength property
allows them to. The input honors the limit when typing but doesn't
enforce it programmatically.
We implemented 1 to guard inputs that end up stored on the server.
Dropping it we lost this guard.
This commit reinstates 2 in `Input` and `Input!` without reinstating 1.
1 is implemented in userland where needed by passing in `:maxlength 100`
manually. We expect to improve this in the future by providing better,
sanitized input components.1 parent 30ffde6 commit 7b857cb
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | | - | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
123 | | - | |
| 125 | + | |
124 | 126 | | |
125 | 127 | | |
126 | 128 | | |
| |||
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
137 | | - | |
| 139 | + | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
0 commit comments