Download the PHP package byteweld/laravel-validation-rules without Composer

On this page you can find all versions of the php package byteweld/laravel-validation-rules. 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 laravel-validation-rules

Laravel Validation Rules Package

A package to add custom validation rules for Laravel, including country-based phone number validation.

πŸš€ Features


πŸ“¦ Installation

You can install the package via Composer:

After installation, Laravel will automatically discover the service provider.

If you're using Laravel <5.5, you need to add the service provider manually in config/app.php:


πŸ›  Usage

You can use the validation rules in Laravel’s validation system.

πŸ“ž Country-Based Phone Number Validation

Rule: phone_number:{country}

This rule validates a phone number based on country-specific criteria.

Example Usage

Validation Logic for India

βœ… Must contain only numbers
βœ… Length must be exactly 10 digits
βœ… Must start with 6, 7, 8, or 9


🌎 International Phone Number Validation

Rule: international_phone_number:{country}

This rule validates international phone numbers according to country-specific formats.

Example Usage

Validation Logic for India

βœ… Must contain only numbers
βœ… Length must be exactly 13 characters
βœ… Must start with +91 followed by a 10-digit mobile number
βœ… The number must start with 6, 7, 8, or 9


πŸ§ͺ Running Tests

To ensure everything works as expected, run the tests:


πŸ›  Customization

You can extend the validation for more countries. To contribute, submit a pull request on GitHub.


πŸ“Œ Versioning

This package follows semantic versioning (MAJOR.MINOR.PATCH).


πŸ“œ License

This package is open-source and licensed under the MIT License.


πŸ”— Contributing

We welcome contributions! If you find a bug or want to add more validation rules, feel free to:

  1. Fork the repo.
  2. Create a new branch.
  3. Submit a pull request.

πŸ“¬ Support

For any issues, open an issue on GitHub:
πŸ”— GitHub Issues


πŸ“’ Next Steps

βœ… Add support for more countries
βœ… Add a configuration file for dynamic country validation
βœ… Improve test coverage


All versions of laravel-validation-rules with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
illuminate/support Version ^9.0|^10.0|^11.0|^12.0
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 byteweld/laravel-validation-rules contains the following files

Loading the files please wait ....