Skip to content

Validators::is() doesnt work well with pattern containing pipe character (because of string exploding) #15

@s4muel

Description

@s4muel

i added a PR #14 that covers the pattern e.g.: 'pattern:(John|Carl) Doe'

because of the "foreach (explode('|', $expected) as $item)..." in the is() validator, the validator explodes the string trying to make alternatives of possibilities, but the pipe in the $expected string represents regex alternative. don't know how to solve it generally, so i made just the update to test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions