Skip to content

Date rule string or array #51

@Delpfine

Description

@Delpfine
 $val->addField('date2')
            ->date('d-m-Y');

I`m get error "Illegal string offset 'format'"; in /vendor/fuelphp/validation/src/Rule/Date.php at line 47

Maybe you should use

 $val->addField('date2')
            ->date(['format' =>'d-m-Y']);

correct documentation, or correct the problem in the class Date.php $format = $parameters['format'];

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions