All Questions
250 questions
0
votes
0
answers
52
views
Adding validation if another validation passed in laravel FormRequest
Is it possible to add validation if another validation passed for example I have the following validation rules
return [
'name' => ['required', 'string', 'min:3', 'max:30'],
'password' =>...
0
votes
2
answers
81
views
Laravel 5.7 validation works still not
I have already asked question about Laravel 5.7 validation, however it still does not work quite right. the validation is not executed at all when sending the content.
public function store(Request $...
0
votes
2
answers
190
views
Laravel 5.7 validation makes nothing
My function works by itself but the validation is not executed. Does anyone know what I forgot to add?
This is a snippet of my code:
namespace App\Http\Controllers;
use App\Player;
use App\Tournament;...
-1
votes
1
answer
7k
views
Laravel form request validation return error
i'm using laravel form request validation to validate a request from view to controller. i'm using php artisan make:request SpecializedRequest. but when the validation fail it doesn't return back and ...
1
vote
1
answer
524
views
laravel validation does not work with Auth [closed]
I am trying to add validation in the controller but it does not work with auth:check. This is the Laravel version 5.7.
This is the function store that has a problem with the validation.
public ...
2
votes
2
answers
440
views
how to validate atleast one value of form input array in laravel request?
I am passing array input to store function .
<div class="col-md-4 form-group-sub mt-2 date_">
<input type="text" name="date[]" class="form-control ...
0
votes
2
answers
1k
views
Laravel validation enddate after start date not working
i am trying to validate that the end date must be after the start date but its not working
if i put the end date before the start date it pass without showing the error message
here's my code
my ...
0
votes
1
answer
728
views
Laravel validation with condition on a specific column
I want to make a field unique but only with a condition. The field start_date in my event table should be unique only if the pitch_id is the same.
To clarify: a reservation start date can be the ...
0
votes
1
answer
1k
views
Laravel unique validation Ignore Rule for update
I have a name field on my Client model which must be unique. For the store method I have the following rules:
array (
'token' => 'string|max:250',
'directory' => 'max:250',
'name' => '...
1
vote
2
answers
377
views
Laravel validators: prevent submit 2 parameters together
How to prevent presents of 2 parameters that existed in required_without_all validator, ex:
return [
'user' => 'required_without_all:customer,public',
'customer' => '...
1
vote
1
answer
1k
views
How to return errors in Laravel Custom Request to Ajax
I made custom request as following.
class CustomRequest extends FormRequest
{
public function authorize()
{
return true;
}
public function rules()
{
$rule['name']='...
0
votes
0
answers
97
views
Show name of fields in message in Input Array Validation in Laravel
I have array of dropdown with the same name what i'm trying to do is
to display the actual name of the field when the error is displayed but now it is displaying like
attributes.Size Attributes ...
0
votes
1
answer
171
views
restrict number of files to upload for particular users
In my property section I have two property types:
Freemium
Premium
I want to restrict users to upload only 5 images for Freemium property type while for Premium properties a user can upload ...
0
votes
1
answer
721
views
How to pass array in Custom validation in Laravel 5.5
I have pass an arraybooking_type_all parameter in custom validation.
It's giving the error:
Array to string conversion
How to pass the array?
$validatedData = Validator::make($request->all(),[
...
0
votes
1
answer
199
views
Laravel Rule: Custom Validation Depending Upon Two Request Inputs
I want to validate if the user is associated with the order in the request validation.
Order Migration:
$table->bigIncrements('id');
$table->unsignedBigInteger('user_id')->nullable();
...
...