Skip to content

Add support for pattern() #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 9, 2019
Merged

Add support for pattern() #6

merged 1 commit into from
Jul 9, 2019

Conversation

integer
Copy link
Contributor

@integer integer commented Jun 25, 2019

  • new feature
  • BC break? no

This PR adds support for pattern() method for validating schema with power of regular expressions.

@@ -43,6 +43,14 @@ public static function __callStatic(string $name, array $args): Type
}


public static function pattern(string $pattern): Type
{
$type = new Type('pattern');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be Type('string'), or isn't?

@dg dg merged commit f1123ee into nette:master Jul 9, 2019
@dg
Copy link
Member

dg commented Jul 9, 2019

Thanks

dg pushed a commit that referenced this pull request Jul 9, 2019
dg pushed a commit that referenced this pull request Jul 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants