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

Strict validation #44

Merged
merged 5 commits into from
Jan 11, 2021
Merged

Strict validation #44

merged 5 commits into from
Jan 11, 2021

Conversation

arandilopez
Copy link
Owner

Adds a new rule for strictly validation. Now you can validate the exact profane word in the content.

<?php
// ...
class MyController extends Controller
{
    public function store(Request $request)
    {
        $this->validate($request, [
            'username' => 'required|strictly_profane:es,en'
        ]);

        // ...
    }
}

This fixes known issues (#9) when you get a error in validation for words like class or analysis, as they include ass and anal respectively, but fails the validation for content like sucker69.

@arandilopez arandilopez merged commit 71ec6a8 into master Jan 11, 2021
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.

1 participant