Answers for "add validation rule laravel"

PHP
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
1

laravel custom validation rules

php artisan make:rule Uppercase
Posted by: Guest on April-10-2021
0

laravel custom validation

php artisan make:rule RuleName
Posted by: Guest on February-06-2021

Code answers related to "add validation rule laravel"

Browse Popular Code Answers by Language