docs: add settings validation reference#5218
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a comprehensive documentation reference for validation rules across radio/device/module/channel configuration screens, including interval presets and reusable core:ui component behavior, with constraints sourced from protobuf max_size annotations and the settings UI form layer.
Changes:
- Introduces
docs/settings-validation.mdas a field-by-field validation reference for config screens. - Documents
IntervalConfigurationallowed value sets and shared constants (e.g., GPIO pin ranges). - Summarizes validation/enforcement behavior of reusable
core:uipreference components.
| | Field | Type | Validation | Notes | | ||
| |-------|------|------------|-------| | ||
| | `long_name` | String | maxSize: 39 bytes (proto max_size: 40) | Required (non-blank) | | ||
| | `short_name` | String | maxSize: 4 bytes (proto max_size: 5) | Required (non-blank) | |
| | Field | Type | Validation | Notes | | ||
| |-------|------|------------|-------| | ||
| | `public_key` | Base64 | 32 bytes; read-only | Auto-derived from private key | | ||
| | `private_key` | Base64 | 32 bytes | Key generation applies bit masking: `f[0] &= 0xF8`, `f[31] = (f[31] & 0x7F) ǀ 0x40` | |
| Shows a live byte counter when focused. | ||
| - **Int mode:** Validates with `toIntOrNull()`; sets error icon on failure. |
|
|
||
| ### EditIPv4Preference | ||
|
|
||
| - Regex validation: `\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}`. |
|
@copilot /docs is where the user facing docs are kept - find a better place for this to live |
Moved it out of |
✅ Preview staleness check passedPreview and screenshot references are up to date. |
Agent-Logs-Url: https://github.com/meshtastic/Meshtastic-Android/sessions/b9b68633-39b3-466b-b40c-e3a6bdd92e99 Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
Agent-Logs-Url: https://github.com/meshtastic/Meshtastic-Android/sessions/b9b68633-39b3-466b-b40c-e3a6bdd92e99 Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
✅ Docs staleness check passedThis PR includes updates to |
8752b6b to
934d512
Compare
Comprehensive reference documenting the validation rules enforced on every radio config and module config settings screen, sourced from both protobuf
max_sizeannotations and the UI form layer.IntervalConfigurationcontexts with their exact allowed value sets in secondscore:uicomponent (EditTextPreference,DropDownPreference,EditIPv4Preference,EditBase64Preference,BitwisePreference,SliderPreference, etc.) enforces constraintsExample entry:
long_namelatitudefixed_position = truefixed_pinAlso notes known discrepancies (e.g.
allow_input_sourceUI enforces 63 bytes while proto specifiesmax_size: 16).