Using number of items in multiplier in validation

Aperta
#81 2 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
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
php
Ambito
backend

Direzione di ricerca

Start by tracing getCopyNumber and the validation callback where multiplier items are defined. Determine how validation can access the current item count and item number; done when a field can depend on the multiplier count and validation messages can identify the current item.

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

Descrizione

I'm unable to use number of multiplier items for validation. I'd like to validate other parts of the form based on current number of items in the multiplier (it seemed like the method getCopyNumber might be the one but it just returns 0), e.g. some field is mandatory when there's more than 3 items.

It would also be helpful to have number of the current item itself as part of the validation message, e.g. "You need to fill the 3. item's name" - I can't really access the multiplier itself in the defining function, let alone get the current number.

Thanks!

Lingua principale
PHP
Stelle
29
Fork
20
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

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 contributte/forms-multiplier

Tutte le issue di contributte/forms-multiplier

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.