Download the PHP package kartik-v/yii2-validators without Composer

On this page you can find all versions of the php package kartik-v/yii2-validators. 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 yii2-validators

yii2-validators

Stable Version Unstable Version License Total Downloads Monthly Downloads Daily Downloads

This extension adds new model validator components for Yii2 frameworkor and/or enhances existing Yii2 model validators.

The EmailValidator extends the yii\validators\EmailValidator component to support multiple email inputs for Yii2 framework. In addition this validator allows setting the multiple property and setting the min and max number of email addresses allowed. This is useful for adding validation rules to your attributes in the model and also adds enhanced client validation support for ActiveForm inputs at runtime via Javascript.

The PhoneValidator extends the yii\validators\Validator component using libphonenumber-for-php based on Google's libphonenumber library.

The CardValidator extends the yii\validators\Validator component. It validates standard debit and credit card number inputs using Luhn's checksum validation. It also helps auto detect the card types and additionally validating the card holder name, expiry date and CVV entered.

The JsonValidator extends the yii\validators\Validator component. It validates JSON input in text area fields. The validator also helps to overwrite the JSON input as a pretty format via prettify setting. It includes both server and client validations.

Demo

You can see detailed documentation and demos on usage of this extension.

Installation

The preferred way to install this extension is through composer.

NOTE: Check the composer.json for this extension's requirements and dependencies. Read this web tip /wiki on setting the minimum-stability settings for your application's composer.json.

Either run

or add

to the section of your composer.json file.

Usage

EmailValidator

This class extends the yii\validators\EmailValidator class to offer multiple email validation support. The EmailValidator class can be easily used via the alias k-email in your model validation rules. For example in your model you can use this as shown below:

In your view where you render the model inputs with ActiveForm - you may set enableClientValidation to control whether you need client side validation.

PhoneValidator

This class extends the yii\validators\Validator class to validate phone numbers using libphonenumber-for-php based on Google's libphonenumber library. The PhoneValidator class can be easily used via the alias k-phone in your model validation rules. For example in your model you can use this as shown below:

CardValidator

The CardValidator extends the yii\validators\Validator component. It validates standard debit and credit card number inputs using Luhn's checksum validation. It also helps auto detect the card types and additionally validating the card holder name, expiry date and CVV entered. The CardValidator class can be easily used via the alias k-card in your model validation rules. For example in your model you can use this as shown below:

JsonValidator

The JsonValidator extends the yii\validators\Validator component. It validates JSON input in text area fields. The validator also helps to overwrite the JSON input as a pretty format via prettify setting. It includes both server and client validations. The JsonValidator class can be easily used via the alias k-json in your model validation rules. For example in your model you can use this as shown below:

License

yii2-validators is released under the BSD-3-Clause License. See the bundled LICENSE.md for details.


All versions of yii2-validators with dependencies

PHP Build Version
Package Version
Requires kartik-v/yii2-krajee-base Version >=2.0.0
giggsey/libphonenumber-for-php Version ^8
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 kartik-v/yii2-validators contains the following files

Loading the files please wait ....