How to Get Value From Trumbowyg Textarea on Livewire - laravel

I created textarea form element using Livewire, I use Trumbowyg to make WYSIWYG. After sending data trhough submit on livewire, I coundn't get data from textarea, it's null and not passing validation.
Here is my text area form:
<div class="form-group col-md-12">
<label for="content" class="box-title">{{ __('Content') }}</label>
<textarea id="content" name="content" class="form-control form-control-user #error('content') is-invalid #enderror" wire:model.defer="content" required autocomplete="content">
</textarea>
#error('content')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
#enderror
</div>
Is there any solution for these?

Related

form control error on form submission in laravel app

on form submission, for some fields form-control error is working on one text area it is not working, this is description area + in control error i want to include that submitter should fill min 350 words or more. here is exact from blade template
control error is working on this:
<div class="form-row mb-3">
<div class="col-md-4">
<label for="item_title" class="text-black">{{ __('backend.item.title') }}</label>
<input id="item_title" type="text" class="form-control #error('item_title') is-invalid #enderror" name="item_title" value="{{ old('item_title') ? old('item_title') : $item->item_title }}">
#error('item_title')
<span class="invalid-tooltip">
<strong>{{ $message }}</strong>
</span>
#enderror
control error is not working on this fill
<div class="form-row mb-3">
<div class="col-md-12">
<label for="item_description" class="text-black">{{ __('backend.item.description') }}</label>
<textarea class="form-control #error('item_description') is-invalid #enderror" id="item_description" rows="5" name="item_description">{{ old('item_description') ? old('item_description') : $item->item_description }}</textarea>
#error('item_description')
<span class="invalid-tooltip">
<strong>{{ $message }}</strong>
</span>
#enderror
</div>
</div>
i applied the control but its not working

Laravel 8 bootstrap auth error message not displayed

I installed a new laravel 8 with bootstrap auth.
I added first_name and last_name to the users table and to the register controller validation, blade etc.
My form:
<form method="POST" action="{{ route('register') }}">
#csrf
<div class="form-group row">
<label for="first_name" class="col-md-4 col-form-label text-md-right">First Name</label>
<div class="col-md-6">
<input id="first_name" type="text" class="form-control #error('first_name') is-invalid #enderror" name="first_name" value="{{ old('first_name') }}" required autocomplete="first_name" autofocus>
#error('first_name')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
#enderror
</div>
</div>.... and the rest of the fields
I try to register a user without filling any of the fields.
The fields get a red border and the first field (first_name) get a tooltip with the message please fill out this field.
But I don't see the error messages that should appaer under each field:
#error('first_name')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
#enderror
This does not show anything.
I don't want tooltips I want the messages to appear under the fields.
How do I do that? why does it ignore the #error statement in the blade file?
Also I don't see where it goes in the dev console, when I click submit I don't see anything in the console.
What is going on here?

Error message not displaying on front-end laravel fortify

I'm trying to use fortify to create a recovery password page, where it asks for the user email and it should display an error message whenever the user tries to enter an email that is not valid, but the problem here is that the error message is only appearing on the server side and not on the page as it should. If I don't use bootstrap class in the error span it works, but I would like to know if there's any other way to solve this.
Here's the form:
<div class="limiter">
<div class="container-login100">
<div class="wrap-login100 p-l-55 p-r-55 p-t-65 p-b-50">
<form class="login100-form validate-form" action="{{route('password.request')}}" method="post">
#csrf
<span class="login100-form-title p-b-33">
Reset your password
</span>
#if(session('status'))
<div class="alert alert-success" role="alert">
{{ session('status') }}
</div>
#endif
<div class="wrap-input100 validate-input" data-validate = "Valid email is required: ex#abc.xyz">
<input class="input100" type="text" name="email" placeholder="Email">
<span class="focus-input100-1"></span>
<span class="focus-input100-2"></span>
#error('email')
<span class="invalid-feedback is-invalid" role="alert">
<strong>{{$message}}</strong>
</span>
#enderror
</div>
<div class="container-login100-form-btn m-t-20">
<button class="login100-form-btn" type="submit">
Send email
</button>
</div>
</form>
</div>
</div>
</div>
And this is where I think the problem might be:
#error('email')
<span class="invalid-feedback is-invalid" role="alert">
<strong>{{$message}}</strong>
</span>
#enderror

Laravel 6.x When we enter wrong record from login then error doesn't showing

Customization Multi-auth Panel system. Also without using Auth::routes();
When we enter the wrong record from login page then the error doesn't showing. Why?
<div class="form-group">
<div class="form-label-group">
<input id="user_name" type="text" class="form-control #error('user_name') is-invalid #enderror" name="user_name" value="{{ old('user_name') }}" required autocomplete="user_name" autofocus>
<label for="user_name">{{ __('User-Name') }}</label>
</div>
#error('user_name')
<strong class="invalid-feedback d-block" role="alert">
{{ $message }}
</strong>
#enderror
</div>

bootstrap 4 and laravel 5.6 not showing error under input field

I am using laravel 5.6 and have the follwing in blade file:
<form method="POST" action="/review">
#csrf
{{ $errors->first('nickname') }}
<input type="hidden" name="book_id" value="{{ request()->route('id') }}">
<div class="form-group">
<label for="nickname">nickname:</label>
<input type="text" name="nickname" class="form-control {{ $errors->has('nickname') ? 'is-ivalid' : ''}}" id="nickname">
#if($errors->has('nickname'))
<div class="invalid-feedback" role="alert">
<strong>{{ $errors->first('nickname') }}</strong>
</div>
#endif
</div>
<div class="form-group">
<label for="review">comment:</label>
<textarea name="review" class="form-control"></textarea>
#if($errors->has('review'))
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('review') }}</strong>
</span>
#endif
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
as you see in the third line I added {{$errors->first('nickname')}} just to make sure it has output and it does but just not showing the output under the input field.
how to solve this? why it happened?
You have a typo in {{ $errors->has('nickname') ? 'is-ivalid' : ''}} should be is-invalid.

Resources