Closed adriaroca closed 5 years ago
Cool idea! :)
But we think ifHasError is a better name for the directive. Can you change it?
Thanks!
Done ;)
Sorry, we changed our minds, please rename it to hasError, and please change the enderror to endhaserror. Sorry for the redundant work, but thanks for the PR! :)
Thanks :)
In many of my projects I tend to use
@if ($ errors-> has ('input_name'))
to detect if an input has an error. For a more comfortable reading, I suggest you add this directive:Replace this:
@if($errors->has('input_name')) This input has an error @endif
For:
@error('input_name') This input has an error @enderror