docs(11.1-04): log lagoon gaps found while writing the Database pages
- lagoon.Validate reports numeric min failures with the max message - the lagoon README callback example sorts after the after-commit flush, and the pivot Preload ordering claim does not hold
This commit is contained in:
12
.planning/todos/pending/lagoon-validate-min-message.md
Normal file
12
.planning/todos/pending/lagoon-validate-min-message.md
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
title: lagoon.Validate reports every numeric range failure with the max message
|
||||
date: 2026-09-30
|
||||
priority: medium
|
||||
area: summercms.go lagoon
|
||||
---
|
||||
|
||||
When a field has `integer` or `numeric` and a `min`, `max` or `between` rule, `lagoon.Validate` checks the range once and always answers a failure with the `max` message. With only `min:0` and a value of `-1`, the message is `The views may not be greater than .`: the wrong rule and an empty parameter. Laravel answers `The views must be at least 0.` for `min` and `The views must be between 0 and 10.` for a numeric `between`.
|
||||
|
||||
Found while writing `docs/database/casts-and-validation.md` (Phase 11.1 plan 04). The page does not show a `min` failure; its example uses `max:1000`, whose message is correct.
|
||||
|
||||
Suggested fix: in `modules/lagoon/validate.go`, pick the message by which bound failed (`min` below the lower bound, `max` above the upper, `between` when both bounds came from `between`), with a unit test per case. Check the PHP API responses first if a ported endpoint depends on the current text. The change is outside the docs phase boundary, so it is not made in Phase 11.1.
|
||||
Reference in New Issue
Block a user