whitecube / nova-flexible-content

Flexible Content & Repeater Fields for Laravel Nova
MIT License
788 stars 231 forks source link

Validation on layouts not working #452

Closed PaulLawton227 closed 1 year ago

PaulLawton227 commented 1 year ago

Nova: 3.32 whitecube/nova-flexible-content: 0.2.13

My Fields array: Text::make('Test', 'test')->rules('required'), Flexible::make('Opt Ins', 'fields') ->button('Add Opt In') ->addLayout('Opt In', 'opt_ins', [ Text::make('Opt In Handle', "opt_in_handle")->rules('required'), Text::make('Opt In Description'), ]), The validation on the root 'Test' field works - but nothing triggers on submit for the layout field (apart from adding the red star to the required fields)

image
PaulLawton227 commented 1 year ago

Not a bug - turns out is was an issue with using DigitalCreative\JsonWrapper to wrap the fields with. using Naoray/nova-json wrapper instead fixed the issue.

Kristories commented 1 year ago

Hey @PaulLawton227 can you show us how to solve this using Naoray/nova-json?

piotrku commented 8 months ago

This error still persists. You get only general page saving error + a red '*' - without analyzing error log there is no way of knowing what is happening - what causes the page saving (validation) error. Have anyone solved this problem yet?