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

[9.x] Added required directive #43103

Merged
merged 1 commit into from
Jul 11, 2022
Merged

Conversation

erikn69
Copy link
Contributor

@erikn69 erikn69 commented Jul 8, 2022

Closes #43102

This PR provides the use of the common HTML directive required through a shorthand syntax via a Blade directive. Allowing developers to have a more enjoyable method of required a input, for example, could improve the smooth flow that we Laravel developers are consistently being treated too. Simple yet, effective. Example

 <input type='email' name="email" @required( !auth()->user()->is_admin )>
 <input type='password' name="password" @required( !auth()->user()->is_admin )>

I will add it on laravel/docs if it is merged

@erikn69 erikn69 changed the title Added required directive [9.x] Added required directive Jul 8, 2022
@taylorotwell taylorotwell merged commit e0b44d1 into laravel:9.x Jul 11, 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