Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Add max length to user input fields

Aperta
#964 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
frontend

Direzione di ricerca

Start by reading application/common/types/commonTypes.ts to find the defined limits, then inspect the Participant and Admin clients and the existing Contact Us form implementation. Identify all user input fields and how their length limits are presented; done means the clients communicate limits consistently with the shared types and the approach is easy to extend to new fields.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

PR related to #891 adds max length to most fields in the api validation, but users are still able to input unreasonably large strings.

Below I was able to input an extremely long string in the first name field (note: that it failed validation):

...JudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudithJudi'
... 31159 more characters
[backend]:     }
[backend]:   },
[backend]:   status: 400
[backend]: }
[backend]: {
[backend]:   message: 'Validation Failed',
[backend]:   details: { 'bodyRequest.firstName': { message: 'Invalid value provided' } },
[backend]:   level: 'error',
[backend]:   timestamp: '2026-09-22T03:41:55.923Z'
[backend]: }

It is good practice to communicate limits to users, so we should add max length information to all user input fields (Participant and Admin clients). The max lengths should align with those in application/common/types/commonTypes.ts.

There are a couple of cases where this exists already (e.g. Contact Us form). Ideally the implementation of this is done in a way that makes it easy to maintain and add to new fields that are created.

Lingua principale
TypeScript
Stelle
4
Fork
0
Merge medio
14h 50m
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Garvan-Data-Science-Platform/ctrl

Tutte le issue di Garvan-Data-Science-Platform/ctrl

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.