Answers for "laravel required with"

PHP
0

laravel required if

"sale_price" => "required_if:list_type,==,selling"
Posted by: Guest on March-24-2021
4

laravel validation

/**
 * Store a new blog post.
 *
 * @param  Request  $request
 * @return Response
 */
public function store(Request $request)
{
    $validatedData = $request->validate([
        'title' => 'required|unique:posts|max:255',
        'body' => 'required',
    ]);

    // The blog post is valid...
}
Posted by: Guest on October-19-2020
2

rule::exists with custom message laravel

$messsages = array(
		'email.required'=>'You cant leave Email field empty',
		'name.required'=>'You cant leave name field empty',
                'name.min'=>'The field has to be :min chars long',
	);

	$rules = array(
		'email'=>'required|unique:content',
		'name'=>'required|min:3',
	);

	$validator = Validator::make(Input::all(), $rules,$messsages);
Posted by: Guest on May-07-2020
0

validation required in laravel

Request()->validate([
            'nik' => 'required',
            'nama' => 'required',
            'alamat' => 'required',
            'notelp' => 'required',
            'jk' => 'required',
            'agama' => 'required',
            'pekerjaan' => 'required',
            'status' => 'required',

        ], [
            'nik.required' => 'nik Wajib Diisi!',
            'nama.required' => 'nama perolehan Wajib Diisi!',
            'alamat.required' => 'alamat Wajib Diisi!',
            'notelp.required' => 'notelp Wajib Diisi!',    
            'jk.required' => 'jk Wajib Diisi!',        
            'agama.required' => 'agama habis Wajib Diisi!',
            'pekerjaan.required' => 'pekerjaan Wajib Diisi!',
            'status.required' => 'status Wajib Diisi!',
        ]);
Posted by: Guest on October-09-2021
0

validation.required laravel

9

If it has worked for you before then you should check if you have messages defined in the app\lang\en\validation.php or by chance you have changed the locale of the app and have not defined the messages for it. There are many possibilities.
Posted by: Guest on March-24-2021

Browse Popular Code Answers by Language