mirror of https://github.com/usememos/memos.git
Add early validation for custom memo IDs to provide clear error
messages when an invalid format is provided.
Validation ensures memo_id matches the required pattern:
- 1-32 characters long
- Alphanumeric and hyphens only
- Cannot start or end with a hyphen
- Pattern: ^[a-zA-Z0-9]([a-zA-Z0-9-]{0,30}[a-zA-Z0-9])?$
This provides better UX by catching format errors early with a
descriptive error message rather than a generic "invalid uid"
error from the store layer.
|
||
|---|---|---|
| .. | ||
| profiler | ||
| router | ||
| runner | ||
| server.go | ||