feat: raise FILES field max number of values from 10 to 60 (#20950)

## Summary

Raises the artificial hardcoded ceiling on `maxNumberOfValues` for
custom FILES fields from `10` to `60` so users can attach more files per
record.

- Bumped `FILES_FIELD_MAX_NUMBER_OF_VALUES` constant in `twenty-shared`
from `10` to `60`
- Updated validator unit test (inline snapshots + "exceeds max" case)
- Updated create/update files-field metadata integration tests and Jest
snapshots

The frontend Zod schema only enforces a `min`, so no frontend changes
are required — the backend constant is the single source of truth for
the upper bound.

Refs #20942

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
This commit is contained in:
Félix Malfait
2026-05-27 10:53:09 +02:00
committed by GitHub
parent 423faa6153
commit ac89d2ff56
6 changed files with 32 additions and 32 deletions
@@ -57,7 +57,7 @@ describe('validateFilesFlatFieldMetadata', () => {
[
{
"code": "INVALID_FIELD_INPUT",
"message": "maxNumberOfValues must be defined in settings and be a number greater than 0 and less than or equal to 10",
"message": "maxNumberOfValues must be defined in settings and be a number greater than 0 and less than or equal to 60",
},
]
`);
@@ -74,16 +74,16 @@ describe('validateFilesFlatFieldMetadata', () => {
[
{
"code": "INVALID_FIELD_INPUT",
"message": "maxNumberOfValues must be defined in settings and be a number greater than 0 and less than or equal to 10",
"message": "maxNumberOfValues must be defined in settings and be a number greater than 0 and less than or equal to 60",
},
]
`);
});
it('should return error when maxNumberOfValues exceeds max (11)', () => {
it('should return error when maxNumberOfValues exceeds max (61)', () => {
const errors = callValidator(
createFlatEntityToValidate({
universalSettings: { maxNumberOfValues: 11 },
universalSettings: { maxNumberOfValues: 61 },
}),
);
@@ -91,7 +91,7 @@ describe('validateFilesFlatFieldMetadata', () => {
[
{
"code": "INVALID_FIELD_INPUT",
"message": "maxNumberOfValues must be defined in settings and be a number greater than 0 and less than or equal to 10",
"message": "maxNumberOfValues must be defined in settings and be a number greater than 0 and less than or equal to 60",
},
]
`);