2017 © Pedro Peláez
 

cakephp-plugin localized

CakePHP Localized Plugin

image

cakephp/localized

CakePHP Localized Plugin

  • Wednesday, May 23, 2018
  • by cakephp
  • Repository
  • 42 Watchers
  • 204 Stars
  • 138,900 Installations
  • PHP
  • 6 Dependents
  • 0 Suggesters
  • 172 Forks
  • 5 Open issues
  • 19 Versions
  • 6 % Grown

The README.md

CakePHP Localized plugin

Build Status Coverage Status Latest Stable Version Total Downloads Software License, (*1)

This plugin contains various localized validation classes for specific countries., (*2)

Requirements

This branch is for use with CakePHP 5.x. See version map for details., (*3)

Demo

See sandbox.dereuromark.de/sandbox/localized for live sandbox demo on localized validation., (*4)

Installation

You can install this plugin into your CakePHP application using composer., (*5)

The recommended way to install composer packages is:, (*6)

composer require cakephp/localized

Load your plugin using, (*7)

bin/cake plugin load Cake/Localized

or by manually adding 'Cake/Localized' to the array in your app's config/plugins.php., (*8)

Model validation

Localized validation classes can be used for validating model fields., (*9)

namespace App\Model\Table;

use Cake\ORM\Table;
use Cake\Localized\Validation\FrValidation;
use Cake\Validation\Validator;

class PostsTable extends Table
{
    public function validationDefault(Validator $validator): Validator
    {
        $validator->setProvider('fr', FrValidation::class);
        $validator->add('phoneField', 'myCustomRuleNameForPhone', [
            'rule' => 'phone',
            'provider' => 'fr',
        ]);
    }
}

For further information on validation rules see the CakePHP documentation on validation, (*10)

PO files

This plugin also houses translations for the client-facing translated strings in the core (the cake domain). to use these files link or copy them into their expected location: resources/locales/<locale>/cake.po, (*11)

Contributing to Localized

If you find that your country is not part of the Localized plugin, please fork the project on GitHub. Once you have forked the project you can commit your validator class (and any test cases). As soon as you have pushed your changes back to GitHub you can send a pull request and your changes will be reviewed and merged in, or feedback will be given., (*12)

Validation methods

There are a few methods that are common to all classes, defined through the interface "ValidationInterface":, (*13)

  • phone() to check a phone number
  • postal() to check a postal code
  • personId() to check a country specific person ID

Please try to fit your validation rules in that naming scheme. Apart from that you can also define further validation methods in your implementing class, of course., (*14)

Issues with Localized

If you have issues with Localized, you can report them at github.com/cakephp/localized/issues., (*15)

The Versions

23/05 2018

dev-master

9999999-dev https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp i18n l10n localized

09/05 2018

3.5.0

3.5.0.0 https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp i18n l10n localized

23/02 2018

3.4.0

3.4.0.0 https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp i18n l10n localized

23/01 2018

dev-bump-year

dev-bump-year https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp i18n l10n localized

24/11 2017

dev-deprecate-pl-person-id

dev-deprecate-pl-person-id https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp i18n l10n localized

12/09 2017

3.3.1

3.3.1.0 https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp i18n l10n localized

18/03 2017

3.3.0

3.3.0.0 https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp i18n l10n localized

23/02 2017

3.2.0

3.2.0.0 https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp i18n l10n localized

23/01 2017

3.1.0

3.1.0.0 https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp i18n l10n localized

16/03 2016

2.x-dev

2.9999999.9999999.9999999-dev https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

cakephp i18n l10n localized

29/02 2016

3.0.0

3.0.0.0 https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

The Development Requires

cakephp i18n l10n localized

26/08 2015

2.7.0

2.7.0.0 https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

cakephp i18n l10n localized

19/05 2015

2.6.1

2.6.1.0 https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

cakephp i18n l10n localized

04/04 2015

2.6.0

2.6.0.0 https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

cakephp i18n l10n localized

17/01 2015

2.5.0

2.5.0.0 https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

cakephp i18n l10n localized

01/12 2014

2.4.0

2.4.0.0 https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

cakephp i18n l10n localized

30/07 2014

2.3.0

2.3.0.0 https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

cakephp i18n l10n localized

16/07 2014

2.2.0

2.2.0.0 https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

cakephp i18n l10n localized

06/12 2013

2.1.0

2.1.0.0 https://github.com/cakephp/localized

CakePHP Localized Plugin

  Sources   Download

MIT

The Requires

 

cakephp i18n l10n localized