PHPackages                             sateler/yii2-rut - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. sateler/yii2-rut

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

sateler/yii2-rut
================

Add chilean RUT formatting and validation

2.0.5(7y ago)33.7k↓83%1[1 PRs](https://github.com/sateler/yii2-rut/pulls)BSD 3-ClausePHP

Since Dec 22Pushed 6y ago2 watchersCompare

[ Source](https://github.com/sateler/yii2-rut)[ Packagist](https://packagist.org/packages/sateler/yii2-rut)[ RSS](/packages/sateler-yii2-rut/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (8)Dependencies (2)Versions (19)Used By (0)

[![Build Status](https://camo.githubusercontent.com/c1018ac5e6557f807818ad68d9a404da6e791205b8e098222710ba9b36d128fe/68747470733a2f2f7472617669732d63692e6f72672f736174656c65722f796969322d7275742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/sateler/yii2-rut)

Rut Formatting
==============

[](#rut-formatting)

Load the behavior in the `config/web.php`:

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

```

Or if you use another formatter class, add the behavior:

```
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`.

Rut Validator
=============

[](#rut-validator)

In your model rules, add:

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

```

Rut Widget
==========

[](#rut-widget)

To format input data in textInputs, in your app assets, add:

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

```

And activate the text input using:

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

```

Upgrade from 1.x to 2.x:
========================

[](#upgrade-from-1x-to-2x)

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

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 69% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~89 days

Recently: every ~115 days

Total

18

Last Release

2685d ago

Major Versions

1.3.0 → 2.0.02017-11-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/0dccda8434771641535b87b5ba40f569fa695da1f03dd2ef81c02d851bc175c1?d=identicon)[fsateler](/maintainers/fsateler)

![](https://www.gravatar.com/avatar/e3a8d03b9a70eb019d67cfd5e5bc3c0202878feae4b2e11503a9119df1e86aab?d=identicon)[rsateler](/maintainers/rsateler)

---

Top Contributors

[![fsateler](https://avatars.githubusercontent.com/u/1322013?v=4)](https://github.com/fsateler "fsateler (20 commits)")[![rsateler](https://avatars.githubusercontent.com/u/1533946?v=4)](https://github.com/rsateler "rsateler (9 commits)")

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/sateler-yii2-rut/health.svg)

```
[![Health](https://phpackages.com/badges/sateler-yii2-rut/health.svg)](https://phpackages.com/packages/sateler-yii2-rut)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[borales/yii2-phone-input

Yii2 International telephone numbers - Asset Bundle, Behavior, Validator, Widget

1331.7M6](/packages/borales-yii2-phone-input)[codeonyii/yii2-at-least-validator

Validates at least one (or more) attributes.

28263.7k1](/packages/codeonyii-yii2-at-least-validator)[arogachev/yii2-many-to-many

Many-to-many ActiveRecord relation for Yii 2 framework

3643.1k4](/packages/arogachev-yii2-many-to-many)[yiibr/yii2-br-validator

Provide validations and features for brazilian localization

15107.1k4](/packages/yiibr-yii2-br-validator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
