Commit be5b8b8
teycir
feat(ui): add comprehensive input validations for seal creation
Implements robust input validation checks at the beginning of the handleCreateSeal function.
This includes:
- Ensuring Turnstile token is present.
- Validating message content (not empty, max length 1MB).
- Validating file size (max 25MB).
- Comprehensive checks for 'timed' seals: unlock date existence, valid format, not in the past or now, at least 1 minute in the future, and not more than 20 years in the future.
- Validating 'deadman's switch' pulse interval (between 1 and 90 days).
These changes enhance user experience by providing immediate feedback on invalid inputs and improve the robustness of the sealing process.1 parent f13e7b8 commit be5b8b8
1 file changed
Lines changed: 62 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
162 | | - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
166 | 226 | | |
167 | 227 | | |
168 | 228 | | |
| |||
176 | 236 | | |
177 | 237 | | |
178 | 238 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | 239 | | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | 240 | | |
193 | 241 | | |
194 | 242 | | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | 243 | | |
204 | 244 | | |
205 | 245 | | |
| |||
0 commit comments