Skip to content
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

[6.x] Add Str::isUuid() helper #31148

Merged
merged 3 commits into from
Jan 16, 2020
Merged

[6.x] Add Str::isUuid() helper #31148

merged 3 commits into from
Jan 16, 2020

Conversation

leonhh
Copy link
Contributor

@leonhh leonhh commented Jan 16, 2020

It was already possible to validate uuid's using the Validator class. This PR extracts the validation logic for the uuid rule and puts it into the Str::isUuid() helper.

Usage:

Str::isUuid('a0a2a2d2-0b87-4a18-83f2-2529882be2de'); // Returns true
Str::isUuid('laravel'); // Returns false

@taylorotwell taylorotwell merged commit bfd17f0 into laravel:6.x Jan 16, 2020
Arkanius added a commit to Arkanius/docs that referenced this pull request Jan 18, 2020
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.

None yet

2 participants