feat(calendar): validate appointment RRULE and cap text field lengths #219

Merged
nrupard merged 3 commits from feat/MAPPS-219-appointment-rrule-validation-maxlength into main 2026-06-16 16:34:01 +02:00
Owner

The New Appointment modal stored the Recurrence value verbatim, so a malformed string like "GARBAGE NOT A RULE" was persisted as recurrence_rule and would later fail (or silently misbehave) when the server expands the series, with no feedback to the user. Add validate_rrule, a client-side RFC 5545 parser that checks structure (a ';'-separated list of KEY=VALUE parts), requires a valid FREQ, rejects unknown parts, validates the common numeric/keyword values, and forbids COUNT and UNTIL together. The save handler now rejects an invalid rule at the field before submit; the server stays the source of truth.

Title, Location, and Description had no maxlength. Add client maxlength caps (Title/Location 255, Description 2000) as a UX nicety; the server remains authoritative. Threading Description through required adding a maxlength prop to the shared Textarea component, mirroring Input.

#MAPPS-219

The New Appointment modal stored the Recurrence value verbatim, so a malformed string like "GARBAGE NOT A RULE" was persisted as recurrence_rule and would later fail (or silently misbehave) when the server expands the series, with no feedback to the user. Add validate_rrule, a client-side RFC 5545 parser that checks structure (a ';'-separated list of KEY=VALUE parts), requires a valid FREQ, rejects unknown parts, validates the common numeric/keyword values, and forbids COUNT and UNTIL together. The save handler now rejects an invalid rule at the field before submit; the server stays the source of truth. Title, Location, and Description had no maxlength. Add client maxlength caps (Title/Location 255, Description 2000) as a UX nicety; the server remains authoritative. Threading Description through required adding a maxlength prop to the shared Textarea component, mirroring Input. #MAPPS-219
feat(calendar): validate appointment RRULE and cap text field lengths
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 57s
a956d55e73
The New Appointment modal stored the Recurrence value verbatim, so a malformed string like "GARBAGE NOT A RULE" was persisted as recurrence_rule and would later fail (or silently misbehave) when the server expands the series, with no feedback to the user. Add validate_rrule, a client-side RFC 5545 parser that checks structure (a ';'-separated list of KEY=VALUE parts), requires a valid FREQ, rejects unknown parts, validates the common numeric/keyword values, and forbids COUNT and UNTIL together. The save handler now rejects an invalid rule at the field before submit; the server stays the source of truth.

Title, Location, and Description had no maxlength. Add client maxlength caps (Title/Location 255, Description 2000) as a UX nicety; the server remains authoritative. Threading Description through required adding a maxlength prop to the shared Textarea component, mirroring Input.

#MAPPS-219
Merge remote-tracking branch 'origin/main' into feat/MAPPS-219-appointment-rrule-validation-maxlength
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 59s
cc7f10447b
# Conflicts:
#	src/components/form.rs
refactor(form): unify Textarea maxlength on i64 to match Input
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / clippy + fmt + tests (pull_request) Successful in 1m11s
baf80f137c
The parallel MAPPS-21x validation branches left `Input::maxlength` as `Option<i64>` but `Textarea::maxlength` as `Option<String>`, so the two components took the same prop in different types and every textarea call site had to stringify its cap. Switch `Textarea::maxlength` to `Option<i64>` so both components take a bare integer, and convert the five textarea call sites (contract Notes, project Description x2, invoice Notes, appointment Description) to pass the integer directly.

#MAPPS-219
nrupard deleted branch feat/MAPPS-219-appointment-rrule-validation-maxlength 2026-06-16 16:34:01 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!219
No description provided.