mzur / kirby-form

A form helper for Kirby CMS based websites and apps, using the Post/Redirect/Get pattern.
MIT License
8 stars 6 forks source link

Remove unwanted additional validation parameter #5

Closed lukaskleinschmidt closed 3 years ago

lukaskleinschmidt commented 3 years ago

The options need to be resetted here. Otherwise we end up with additional parameters when calling the validators.

// This will fail because the date rule gets called with two parameters
// ['2021-05-20', 'date'] instead of just the expected ['2021-05-20']
new Form([
    'start_date' => [
        'rules' => ['required' ,'date']
    ]
]);