Skip to content

Can't use "pipe" in Validators pattern #206

@TomPavelec

Description

@TomPavelec

Version: v3.0.1

Bug Description

Can not use "pipe" ("|") character in Validators pattern

Steps To Reproduce

Validators::is('a', 'pattern:(a|b)');
// E_WARNING: preg_match(): Compilation failed: missing closing parenthesis at offset 1

Expected Behavior

Validators::is('a', 'pattern:(a|b)');
// should return true

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