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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user