2017 © Pedro Peláez
 

library yii2-rut

Add chilean RUT formatting and validation

image

sateler/yii2-rut

Add chilean RUT formatting and validation

  • Thursday, November 30, 2017
  • by rsateler
  • Repository
  • 2 Watchers
  • 2 Stars
  • 357 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 17 Versions
  • 3 % Grown

The README.md

Build Status, (*1)

Rut Formatting

Load the behavior in the config/web.php:, (*2)

'formatter' => [
    'class' => \yii\i18n\Formatter::className(),
    'as rutFormatter' => \sateler\rut\RutFormatBehavior::className(),
],

Or if you use another formatter class, add the behavior:, (*3)

public function behaviors() {
    return [ \sateler\rut\RutFormatBehavior::className() ];
}

Then you can use Yii::$app->formatter->asRut(), or specify the rut format in GridView or DetailView., (*4)

Rut Validator

In your model rules, add:, (*5)

['property', \sateler\rut\RutValidator::className()]

Rut Widget

To format input data in textInputs, in your app assets, add:, (*6)

public $depends = [
    ...,
    'sateler\rut\RutWidgetAsset',
];

And activate the text input using:, (*7)

$form->field($model, "rut")->textInput(['data-rut' => 'true'])

Upgrade from 1.x to 2.x:

Just replace references to RutValidator::trimValue($value) to the new function Rut::normalize($value), (*8)

The Versions

30/11 2017

dev-master

9999999-dev

Add chilean RUT formatting and validation

  Sources   Download

BSD 3-Clause

The Requires

 

The Development Requires

by Felipe Sateler

30/11 2017

2.0.3

2.0.3.0

Add chilean RUT formatting and validation

  Sources   Download

BSD 3-Clause

The Requires

 

The Development Requires

by Felipe Sateler

23/11 2017

2.0.2

2.0.2.0

Add chilean RUT formatting and validation

  Sources   Download

BSD 3-Clause

The Requires

 

by Felipe Sateler

23/11 2017

2.0.1

2.0.1.0

Add chilean RUT formatting and validation

  Sources   Download

BSD 3-Clause

The Requires

 

by Felipe Sateler

20/11 2017

2.0.0

2.0.0.0

Add chilean RUT formatting and validation

  Sources   Download

BSD 3-Clause

The Requires

 

by Felipe Sateler

25/08 2017

1.3.0

1.3.0.0

Add chilean RUT formatting and validation

  Sources   Download

BSD 3-Clause

The Requires

 

by Felipe Sateler

17/05 2017

1.2.4

1.2.4.0

Add chilean RUT formatting and validation

  Sources   Download

BSD 3-Clause

The Requires

 

by Felipe Sateler

13/05 2017

1.2.3

1.2.3.0

Add chilean RUT formatting and validation

  Sources   Download

BSD 3-Clause

The Requires

 

by Felipe Sateler

10/08 2015

1.2.2

1.2.2.0

Add chilean RUT formatting and validation

  Sources   Download

BSD 3-Clause

The Requires

 

by Felipe Sateler

09/08 2015

1.2.1

1.2.1.0

Add chilean RUT formatting and validation

  Sources   Download

BSD 3-Clause

The Requires

 

by Felipe Sateler

07/07 2015

1.2.0

1.2.0.0

Add chilean RUT formatting and validation

  Sources   Download

BSD 3-Clause

The Requires

 

by Felipe Sateler

06/07 2015

1.1.3

1.1.3.0

Add chilean RUT formatting and validation

  Sources   Download

BSD 3-Clause

The Requires

 

by Felipe Sateler

09/06 2015

1.1.2

1.1.2.0

Add chilean RUT formatting and validation

  Sources   Download

BSD 3-Clause

The Requires

 

by Felipe Sateler

25/03 2015

1.1.1

1.1.1.0

Add chilean RUT formatting and validation

  Sources   Download

BSD 3-Clause

The Requires

 

by Felipe Sateler

04/02 2015

1.1.0

1.1.0.0

Add chilean RUT formatting and validation

  Sources   Download

BSD 3-Clause

The Requires

 

by Felipe Sateler

26/12 2014

1.0.1

1.0.1.0

Add chilean RUT formatting and validation

  Sources   Download

BSD 3-Clause

The Requires

 

by Felipe Sateler

22/12 2014

1.0.0

1.0.0.0

Add chilean RUT formatting and validation

  Sources   Download

BSD 3-Clause

The Requires

 

by Felipe Sateler