alleyinteractive / alleyinteractive/wordpress-fieldmanager
Incorrect rule key for Fieldmanager_Checkboxes validation_rules
Aperta
bug
scope:field
- Lingua principale
- PHP
- Stelle
- 563
- Fork
- 99
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
When adding `validation_rules` to `Fieldmanager_Checkboxes` the `rules` key in the `jQuery.validate` initialization object is the "singular" name for the field when it should be added as an array:
```js
$( '#post' ).validate( {
...
rules: {
"checkboxesfield": { // <- This doesn't work
required: true
},
...
```
It should be `checkboxesfield[]`, not `checkboxesfield`:
```js
$( '#post' ).validate( {
...
rules: {
"checkboxesfield[]": { // <- This works!
required: true
},
...
```
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.