Skip to content

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

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

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