Skip to content

Can't use validate with regex_match[] #1084

Description

@HieuPT7

Hi
I use pattern = "/^(01[2689]|09)[0-9]{8}$/" , regex phone number of Viet Nam but it not work

https://bcit-ci.github.io/CodeIgniter4/libraries/validation.html
My Code

$validate->setRules([
            'phone' => [
                'label'  => 'Phone Number',
                'rules'  => 'regex_match[/^(01[2689]|09)[0-9]{8}$/]'
            ]
        ]);

Thanks !!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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