Skip to content

[9.x] Adds not_starts_with validation#42683

Merged
taylorotwell merged 2 commits into
laravel:9.xfrom
mahmoudmohamedramadan:9.x
Jun 7, 2022
Merged

[9.x] Adds not_starts_with validation#42683
taylorotwell merged 2 commits into
laravel:9.xfrom
mahmoudmohamedramadan:9.x

Conversation

@mahmoudmohamedramadan
Copy link
Copy Markdown
Contributor

This PR adds the ability to check if the string does not start with the given values, and I think this validation is important and makes the validation easier and we will not resort to using something else such as Regex.

$request->validate([
    'name' => ['required', 'not_starts_with:mahmoud'],
]);

@taylorotwell The PR sent to 9.x branch as you told :)

@GrahamCampbell GrahamCampbell changed the title Adds not_starts_with validation [9.x] Adds not_starts_with validation Jun 6, 2022
@taylorotwell taylorotwell merged commit 6578b7c into laravel:9.x Jun 7, 2022
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