mahkali/yii2-bsnvalidator

BSN validator for Yii Framework 2.0

Installs: 689

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Type:yii2-extension

1.3.0 2019-04-07 23:42 UTC

This package is auto-updated.

Last update: 2024-12-08 11:51:52 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License

This extension provides BSN (Burger Service Nummer) validation for Yii Framework 2.0.

Installation

The preferred way to install this extension is through composer.

Either run

composer require mahkali/yii2-bsnvalidator

or add

"mahkali/yii2-bsnvalidator": "^1.1"

to the require section of your composer.json file.

Usage

// add this in your model
use mahkali\validators\BsnValidator;

// use the validator in your model rules
public function rules() 
{
    return [
       	['bsn', BsnValidator::class],
    ];
}

Translations

You could set the message attribute. Or - add your language to the package:

Edit:

@vendor/mahkali/yii2-bsnvalidator/src/messages/config.php

Add your language.

Run:

./yii message @vendor/mahkali/yii2-bsnvalidator/src/messages/config.php

Edit your message file in

@vendor/mahkali/yii2-bsnvalidator/src/messages/xx/bsnvalidator.php

And make a PR :) Thank you very much.

License

yii2-bsnvalidator is released under the MIT License. See the bundled LICENSE.md for details.