Category : validation

public function post(Request $request){ $validator = Validator::make($request->all(),[ ‘title’=>’required’, ‘job_type_id’=>’required|exists:job_type,id’, ‘work_level_id’=>’required|exists:work_level,id’, ‘no_of_candidate’=>’required’, ]); if ( $validator->fails()) { return $this->validationErrors($validator->errors()); } } this is my validation code which i have written in my controller.I just want to remove this validation from controller. So that i can make same Form Request Validation what we do in the laravel ..

Read more

I have a simple form that sends a value to controller: <form action="{{route(‘mollie.payment’)}}" method="post" > @csrf {{– <input name="text" type="text">–}} <button type="submit" name="test" value="23.00">Send</button> </form> This value will be static and this value cannot be modified. But of course it can be easily changed in Chrome dev tools. How can I better implement this? I ..

Read more

Tenho um campo de data chamado ‘inicio’ no formato date (Y-m-d), porém na hora de salvar, quando eu tento colocar um DIA maior que o número 12, por exemplo 30/04/2021, aparece esse erro: CarbonExceptionsInvalidFormatException Could not parse ’30/04/2021′: DateTime::__construct(): Failed to parse time string (30/04/2021) at position 0 (3): Unexpected character Esse é o meu ..

Read more