Closed dgvirtual closed 4 months ago
When validation rules of $metaFields are defined more extensively, like in the case of baz below, only the first rule (in that particular case - the rule required is applied, while the subsequent rules are ignored.
baz
required
public $metaFields = [ 'Example Fields' => [ 'foo' => ['label' => 'Foo', 'type' => 'text', 'validation' => 'permit_empty|string'], 'Bar' => ['type' => 'text', 'validation' => 'required|string'], 'baz' => [ 'label' => 'Baz', 'type' => 'checkbox', 'validation' => [ 'label' => 'Baz', //'required is applied, but subsequent `in_list` is ignored; 'rules' => 'required|in_list[true,false]' ], ], ], ];
I intend to investigate this problem later.
On further investigation I could not confirm this problem, must have been using rules incorrectly.
When validation rules of $metaFields are defined more extensively, like in the case of
baz
below, only the first rule (in that particular case - the rulerequired
is applied, while the subsequent rules are ignored.I intend to investigate this problem later.