Download the PHP
package raditzfarhan/sahrule without Composer
On this page you can find all versions of the php package
raditzfarhan/sahrule. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
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.
This package provides missing Laravel validation rules.
Installation
Via Composer
Usage
Import validation classes that you need and use it in Laravel validate function as you normally would. Example usage as below snippet:
Use array instead of pipe-delimited string.
Available Rules
All rules are under RaditzFarhan\SahRule\Rules namespace.
Rule
Description
Example
Base64Image
Validate a base64 image string. Pre-defined allowed image types are jpg, jpeg, png, gif, bmp and tiff.
new Base64Image new Base64Image('jpg', 'png')
Base64MaxImageSize
Validate a base64 image size. Default max size is 2 MB. Pass your own max size in byte (B).
new Base64MaxImageSize new Base64MaxImageSize(500)
Validation Message
All rules come with a default validation message that was pre-defined by the package. If you need to write your own custom message, you can overwrite in in validation.php file that typically can be found at resources/lang/en folder.
The validation key is the rule class name in snake case format. For example for Base64Image rule, the key is base64_image. Snippet as below:
Change log
Please see the changelog for more information on what has changed recently.
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 raditzfarhan/sahrule contains the following files
Loading the files please wait ...
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.