alleyinteractive / alleyinteractive/wordpress-fieldmanager

Adding 'required' to a repeater doesn't work

Aperta
#868 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug
Lingua principale
PHP
Stelle
563
Fork
99
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### Description of the bug

If I create a repeater and one of the fields in the group added by the repeater is marked as `required`, the expected functionality associated with this option doesn't seem to work. Is this expected behaviour?

### Steps To Reproduce

If I create a repeater using
```
'limit' => 10, // max number allowed
'collapsible' => true,
'collapsed' => false,
'minimum_count' => 0, // how many to start with
'extra_elements' => 0, // how many blank ones to show in addition to the filled in ones
```
and one of the fields in the group added by the repeater has
```
'attributes' => array(
'required' => true,
),
```
then none of the `require`d things happen: no red border when empty, no popover when trying to save. Is this expected behaviour?

### Additional Information

_No response_

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.