Laravel 6 Required With All Validation Example

Today, We want to share with you Laravel 6 Required With All Form Validation.In this post we will show you Form Validation Example In Laravel 6, hear for Laravel 6 validation with error message we will give you demo and example for implement.In this post, we will learn about Laravel 6 Form Validation Tutorial Example From Scratch with an example.

Laravel 6 Required With All Form Validation

There are the Following The simple About Laravel 6 Form Validation with Error Messages Full Information With Example and source code.

As I will cover this Post with live Working example to develop laravel form validation before submit, so the laravel validation unique except is used for this example is following below.

List of Laravel validation rules

  • Accepted
  • Active URL
  • After (Date)
  • After Or Equal (Date)
  • Alpha
  • Alpha Dash
  • Alpha Numeric
  • Array
  • Bail
  • Before (Date)
  • Before Or Equal (Date)
  • Between
  • Boolean
  • Confirmed
  • Date
  • Date Equals
  • Date Format
  • Different
  • Digits
  • Digits Between
  • Dimensions (Image Files)
  • Distinct
  • E-Mail
  • Ends With
  • Exists (Database)
  • File
  • Filled
  • Greater Than
  • Greater Than Or Equal
  • Image (File)
  • In
  • In Array
  • Integer
  • IP Address
  • JSON
  • Less Than
  • Less Than Or Equal
  • Max
  • MIME Types
  • MIME Type By File Extension
  • Min
  • Not In
  • Not Regex
  • Nullable
  • Numeric
  • Password
  • Present
  • Regular Expression
  • Required
  • Required If
  • Required Unless
  • Required With
  • Required With All
  • Required Without
  • Required Without All
  • Same
  • Size
  • Sometimes
  • Starts With
  • String
  • Timezone
  • Unique (Database)
  • URL
  • UUID

Create Controller Souurce Code

ShopController.php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class ShopController extends Controller
{
    public function create()
    {
    	return view('member-create');
    }

    public function save_data(Request $request)
    {
    	$input = $request->all();

    	$request->validate([
    		'phone' => 'required_with_all:member_first_name,member_last_name',
    		'email' => 'required',
    	]);

    	return redirect()->back();
    }
}

Create Laravel 6 Blade File

resources\views\member-create.blade.php




    Laravel 6 - Required With All Validation
    
    	
    
    
    


    

Laravel 6 Required With All Validation

PHP Laravel 6 - Required With All Validation Example

@if(count($errors) > 0)
    @foreach($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@csrf
Web Programming Tutorials Example with Demo

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Laravel 6 Validating many input fields on a form before SUBMIT.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Comment