conditional-container icon indicating copy to clipboard operation
conditional-container copied to clipboard

Validations not working

Open ZoreAnkit opened this issue 1 year ago • 2 comments

Nova Version: 3.32.0

I have following code structure

Toggle::make(__('Standard'), 'is_standard')
                ->trueColor('green')
                ->falseColor('red')
                ->default(true),
ConditionalContainer::make([
                BelongsTo::make(__('Task Category'), 'taskCategory', 'App\Nova\TaskCategory')
                    ->rules('required')
            ])
                ->if('is_standard truthy true'),

screenshot-localhost-2022 07 11-13_15_37

screenshot-localhost-2022 07 11-13_16_12

As you can see from above images the validation didn't work on task standard field i.e belongs to field under conditional container.

ZoreAnkit avatar Jul 11 '22 07:07 ZoreAnkit

Can you try rollback 1 version and see if it works? v1.4.2

milewski avatar Jul 11 '22 08:07 milewski

Yes it works for v1.4.2

screenshot-localhost-2022 07 11-13_59_09

composer.json

"digital-creative/conditional-container": "1.4.2",

ZoreAnkit avatar Jul 11 '22 08:07 ZoreAnkit