feat(05-05): accept boolean validation token

- Treat Laravel boolean as a type-check no-op in lagoon.Validate
- Settings.search_use_typesense uses this rule string
This commit is contained in:
Jakub Zych
2026-09-18 20:14:46 +02:00
parent 678b216900
commit 4df7e016a2
2 changed files with 15 additions and 0 deletions

View File

@@ -85,6 +85,8 @@ func validateField(ctx context.Context, tx *gorm.DB, model any, field, rule stri
tags = append(tags, oneofTag(strings.Split(arg, ",")))
case "unique":
uniqueTable = arg
case "boolean":
// Go's bool field type already enforces this; treat as a type-check no-op.
default:
return nil, fmt.Errorf("lagoon: unrecognized validation rule %q", tok)
}