open-admin
open-admin copied to clipboard
Setting a required rule for a checkbox on a popup form will prompt for all checks
Describe the bug If set a required rule for a checkbox on a popup form, the rule cannot be used because all checks are required.
To Reproduce Set the following in the action class.
public function form()
{
$this->checkbox('tests', ' TEST')
->rules(['array', 'required'])
->stacked()
->options([
1 => 'test1',
2 => 'test2',
3 => 'test3',
]);
}
If you try to submit with this, you will be asked to check everything.
Expected behavior If one of these is checked, please make sure it can be sent.
System
- Open-admin version v1.0.27
- PHP version 8.1.2
- Laravel Version v9.52.7
- OS: Windows 10
- Browser Chrome
@takagaki-bb thanks for reporting. Now fixed in dev-branch will release soon.