Laravel 6 Required With All Validation Example

Rate this post

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
Read Also:  Laravel 6 After Today Validation Tutorial Example

Create Controller Souurce Code


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();

    		'phone' => 'required_with_all:member_first_name,member_last_name',
    		'email' => 'required',

    	return redirect()->back();

Free Live Chat for Any Issue

Create Laravel 6 Blade File


<!DOCTYPE html>
    <title>Laravel 6 - Required With All Validation</title>
    <link rel="stylesheet" href="">
    <link rel="stylesheet" href=""/>	
    <script src=""></script>
    <script src=""></script>
    <script src=""></script>
    <div class="container">
        <div class="row">
            <div class="col-md-6 offset-3">
                <div class="card mt-5">
                    <div class="card-header text-center bg-primary">
                        <h2 class="text-white"> <strong>Laravel 6 Required With All Validation</strong></h2>
                        <p>PHP Laravel 6 - Required With All Validation Example</p>
                    <div class="card-body">
                        @if(count($errors) > 0)
                            <ul class="alert alert-danger">
                            @foreach($errors->all() as $error)
                                <li>{{ $error }}</li>
                        <form action="{{ route('member.save_data') }}" method="post">
                            <div class="form-group dsp">
                                <label>Member Name :- </label>
                                <input type="text" name="member_first_name" class="form-control tamilrok" value="{{ old('member_first_name') }}">
                            <div class="form-group dsp">
                                <label>Last Name :- </label>
                                <input type="text" name="member_last_name" class="form-control tamilrok" value="{{ old('member_last_name') }}">
                            <div class="form-group dsp">
                                <label>Phone No. :- </label>
                                <input type="text" name="phone" class="form-control tamilrok" value="{{ old('phone') }}">
                            <div class="form-group dsp">
                                <label>Email :- </label>
                                <input type="email" name="email" class="form-control tamilrok" value="{{ old('email') }}">
                            <div class="text-center tamilrok">
                                <button class="btn btn-success"><i class="fa fa-floppy-o" aria-hidden="true"></i> Save </button>

Web Programming Tutorials Example with Demo

Read :

Read Also:  Simple PHP Rating System with database using JavaScript


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 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.