🚗🏍️ Welcome to Motoshare!

Turning Idle Vehicles into Shared Rides & New Earnings.
Why let your bike or car sit idle when it can earn for you and move someone else forward?

From Idle to Income. From Parked to Purpose.
Earn by Sharing, Ride by Renting.
Where Owners Earn, Riders Move.
Owners Earn. Riders Move. Motoshare Connects.

With Motoshare, every parked vehicle finds a purpose. Partners earn. Renters ride. Everyone wins.

Start Your Journey with Motoshare

Image Validation Rule Example

Laravel

You’ll see an illustration of Laravel 9 image validation rules in this article. I gave a brief explanation on laravel 9 image validation. Laravel 9 image validation size will be used. This post covers Laravel 9 image validation mimes in detail. Check out the example laravel 9 image width and height below.

Laravel 9 provides list of default image validation rules to prevent user.

  • image
  • mimes
  • dimensions
  • max

The file types “jpg,png,jpeg,gif,svg” and “max” can be defined using the aforementioned validation criteria, and the file size limit can be set using max. You can limit file height and width using dimensions. Let’s look at the following straightforward sample code.

Example:

          $this->validate($request, [
            'image' => ['required',
                        'image',
                        'mimes:jpg,png,jpeg,gif,svg',
                        'dimensions:min_width=100,min_height=100,max_width=1000,max_height=1000',
                        'max:2048'],
        ]);  
0 0 votes
Article Rating
Subscribe
Notify of
guest
2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
2
0
Would love your thoughts, please comment.x
()
x