Skip to content

[9.x] Added required directive - #43103

Merged
taylorotwell merged 1 commit into
laravel:9.xfrom
erikn69:required_blade
Jul 11, 2022
Merged

[9.x] Added required directive#43103
taylorotwell merged 1 commit into
laravel:9.xfrom
erikn69:required_blade

Conversation

@erikn69

@erikn69 erikn69 commented Jul 8, 2022

Copy link
Copy Markdown
Contributor

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