How to check validator in laravel backened

 

write this type of code  as below

In Laravel is very different -2 type validation use in different version 

i am very happy to write the code because any one want to sample and man made code 

so i have try to write all the code in 


  protected function validator(array $data)

    {

        return Validator::make($data, [

            'name' => 'required|string|max:255',

            'email' => 'required|string|email|max:255|unique:users',

            'password' => 'required|string|min:6|confirmed',

        ]);

    }

1- write the function name validator 

2- I have pass the three parameter name , email and password .

3- name check string innot more than 255 char

4-email check string is more tan 255 char and email is unique in user table

5- password check string minimum 6 char

2- pass the parameter in your funtion

3- the above example we are write the three 


Defintion:

Laravel's Make validation rules with all versions each has an error message that is located in your application's of laravel file. Within this file, you will find a translation entry for each validation rule they are defined without entry you do not but any data in database. so there is a lot of need to create a valid  


How validation rules work in laravel

checks if the input is set by required. if Passed value, and checked jumps to next rule.

then checks if it is in email format. if Passed, the execution function jumps to the next rule.

checks if not exist in table users.

How can I validate my name in laravel?

 And the validation in the controller: $validation = Validator::make($input, $rules, $messages);


. ... They use historical data, batch records, documented evidences, log books, control charts, customer complaints and audit reports to perform validation

How to check validator in laravel backened How to check validator in laravel backened Reviewed by Bugs Solutions on December 12, 2020 Rating: 5

2 comments