Download the PHP package jp3cki/yii2-extra-validator without Composer

On this page you can find all versions of the php package jp3cki/yii2-extra-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 yii2-extra-validator

yii2-extra-validator

License Latest Stable Version

Requirements

Install

  1. Set up Composer, the de facto standard package manager.
  2. Set up your new Yii app if needed.
  3. php composer.phar require jp3cki/yii2-extra-validator

Usage

This package includes these validators:

AvailableUrlValidator

AvailableUrlValidator will check that the URL is accessible.

Validation will failed if remote server returns 4xx(client error) or 5xx(server error).

Model class example:

ConvertCharacterWidthFilterValidator

ConvertCharacterWidthFilterValidator is a filter validator that provides normalization of character width.

This validator may useful for Japanese input.

このフィルタバリデータを利用すると、半角カタカナの入力を全角に変換したり、全角英数を半角英数に変換したり、カタカナをひらがなに変換したりできます。

KatakanaValidatorと組み合わせて使用すると便利かもしれません。

Model class example:

HiraganaValidator

HiraganaValidator validates value that input is hiragana-only string.

このバリデータは入力がひらがなのみで構成されていることを検証します。名前のふりがな入力等に利用できます。

カタカナの検証を行いたい場合はKatakanaValidatorを使用します。

Model class example:

IdnToPunycodeFilterValidator

IdnToPunycodeFilterValidator is a filter validator that provides convert IDN to Punycoded domain name.

This validator may useful when you store URL to the database in ASCII charset.

Model class example:

Controller class example:

KatakanaValidator

KatakanaValidator validates value that input is katakana-only string.

このバリデータは入力がカタカナのみで構成されていることを検証します。名前のフリガナ入力等に利用できます。

ひらがなの検証を行いたい場合はHiraganaValidatorを使用します。

Model class example:

ReCaptchaValidator

ReCaptchaValidator validates reCAPTCHA (API ver.2) input.

First, you must visit reCAPTCHA website and create your keys.

After reCAPTCHA registration, you can get Site key and Secret key.

Open @app/config/params.php file and add these keys like below:

In the HTML output phase, you can use the HTML snippet in the website of reCAPTCHA.

In validation phase, you can set $_POST['g-recaptcha-response'] parameter to our validator and verification.

StrictUrlValidator

StrictUrlValidator validates URL that checks strictly than core validator implementation.

Input UrlValidator(core) StrictUrlValidator(this)
http://example.com/ valid valid
http://example.com/あ valid invalid
http://example.comあ/ valid invalid

Model class example:

TwitterAccountValidator

TwitterAccountValidator validates Twitter's @id name(aka screen name).

By default, our validator repels blacklisted account name like mentions.

Model class example:

Currently, we do not support client-side(JavaScript) validation.

ZenginNameFilterValidator

ZenginNameValidator

These validators are useful if you are dealing with a bank account for the Japanese app.

ZenginNameFilterValidator は入力された文字列を(自動判断できる範囲で)全銀用の文字列に変換します。

実際の利用では、口座名義などにフィルタをかけ、実際のバリデータである ZenginNameValidator へデータへ引き継ぐことになります。

ZenginNameValidator は入力された文字列が全銀用の文字列として妥当か検査します。 このバリデータは例えば全角カタカナを受け付けないので、 ZenginNameFilterValidator を事前に通して入力の補助とできます。 (半角カタカナで入力を強制するのは非人道的です。また、長音の代わりにハイフンを使用する必要があるなど人間が徹底して守るにはつらいです)

Model class example:

License

The MIT License.

Contributing

Patches and/or report issues are welcome.

I strongly hope rewrite my poor English.


All versions of yii2-extra-validator with dependencies

PHP Build Version
Package Version
Requires php Version >= 8.0
ext-intl Version *
ext-mbstring Version *
ext-pcre Version *
jp3cki/mb_str_replace Version ^4.0.2
yiisoft/yii2 Version ^2.0.50
yiisoft/yii2-httpclient Version ^2.0.15
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 jp3cki/yii2-extra-validator contains the following files

Loading the files please wait ....