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

How to show validation error? #101

Open
BilawalSh opened this issue Oct 30, 2022 · 2 comments
Open

How to show validation error? #101

BilawalSh opened this issue Oct 30, 2022 · 2 comments

Comments

@BilawalSh
Copy link

I put validation in my controller but when any validation fails then it is not showing any message.

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

@andrew21-mch
Copy link

andrew21-mch commented Oct 30, 2022

Hi @BilawalSh how did you access the validation on the front-end

@BilawalSh
Copy link
Author

BilawalSh commented Nov 7, 2022

This is the point that is unclear in the documentation.

I am doing this way

@if ($errors->any())
    @foreach ($errors->all() as $error)
        @php
            notify()->error($error);
        @endphp
    @endforeach
@endif

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

No branches or pull requests

2 participants