Download the PHP package cviebrock/image-validator without Composer

On this page you can find all versions of the php package cviebrock/image-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package image-validator

Image-Validator

Extra validation rules for dealing with images in Laravel 5.

NOTE: As of Laravel version 5.2, there are now built-in validation rules for image dimensions and aspect ratios. This package is not required and will no longer be maintained.

Build Status Total Downloads Latest Stable Version Latest Unstable Version Scrutinizer Code Quality SensioLabsInsight License: MIT


Installation

NOTE: Depending on your version of Laravel, you should install a different version of the package:

Laravel Version Package Version
4.* 1.x
5.0–5.3 2.1†
5.4 2.2†
5.5 not supported†

† Laravel 5.2 and later have built-in validation rules for image dimensions.

Install the package through Composer.

Add the following to your providers array in app/config/app.php:

Usage

Use it like any Validator rule. The package offers two rules for image validation:

image_size

The values for width and _height can be integers, or integers with a modifier prefix:

If you only pass one value, it's assumed to apply to both dimensions (i.e. a square image with the given dimensions).

image_aspect

The value for ratio represents width ÷ height and be either a decimal or two values (width, height; both integers):

The value (or first value, if providing height and width) can also be prefixed with a tilde ~ character, in which case the orientation does not matter:

Note that you may run into issues with floating point rounding.

Examples

Bugs, Suggestions and Contributions

Thanks to everyone who has contributed to this project!

Please use Github for reporting bugs, and making comments or suggestions.

See CONTRIBUTING.md for how to contribute changes.

Copyright and License

image-validator was written by Colin Viebrock and is released under the MIT License.

Copyright 2013 Colin Viebrock

Thanks

Lots of thanks to https://bitbucket.org/hampel/validate-laravel for the structure of creating a package to add validator rules to Laravel, and setting up useful unit tests.


All versions of image-validator with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.4
illuminate/config Version ^5.4
illuminate/database Version ^5.4
illuminate/support Version ^5.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cviebrock/image-validator contains the following files

Loading the files please wait ....