PHPackages                             nepada/birth-number-input - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. nepada/birth-number-input

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nepada/birth-number-input
=========================

Czech birth number form input for Nette forms.

v1.3.2(5mo ago)22.1k↓50%[3 PRs](https://github.com/nepada/birth-number-input/pulls)BSD-3-ClausePHPPHP &gt;=8.1.0 &lt;8.6CI failing

Since May 1Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/nepada/birth-number-input)[ Packagist](https://packagist.org/packages/nepada/birth-number-input)[ RSS](/packages/nepada-birth-number-input/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (21)Versions (13)Used By (0)

Czech birth number form input
=============================

[](#czech-birth-number-form-input)

[![Build Status](https://github.com/nepada/birth-number-input/workflows/CI/badge.svg)](https://github.com/nepada/birth-number-input/actions?query=workflow%3ACI+branch%3Amaster)[![Coverage Status](https://camo.githubusercontent.com/57e51912b9f653e36481e9f9ab272b554637918f9b065db484bb82a1b73b6ece/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6e65706164612f62697274682d6e756d6265722d696e7075742f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/nepada/birth-number-input?branch=master)[![Downloads this Month](https://camo.githubusercontent.com/14084206db3335bcd52104855fb23d7431d4f1212e083b5527018f36dee68b5d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6e65706164612f62697274682d6e756d6265722d696e7075742e737667)](https://packagist.org/packages/nepada/birth-number-input)[![Latest stable](https://camo.githubusercontent.com/b44b538cf6c86b75a86cd319007207d9474d5f175b396bedeca9d15ede1f2957/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e65706164612f62697274682d6e756d6265722d696e7075742e737667)](https://packagist.org/packages/nepada/birth-number-input)

Installation
------------

[](#installation)

Via Composer:

```
$ composer require nepada/birth-number-input
```

### Option A: install form container extension method via DI extension

[](#option-a-install-form-container-extension-method-via-di-extension)

```
extensions:
    - Nepada\Bridges\BirthNumberInputDI\BirthNumberInputExtension
```

It will register extension method `addBirthNumber($name, $label = null): BirthNumberInput` to `Nette\Forms\Container`.

### Option B: use trait in your base form/container class

[](#option-b-use-trait-in-your-base-formcontainer-class)

You can also use `BirthNumberInputMixin` trait in your base form/container class to add method `addBirthNumber($name, $label = null): BirthNumberInput`.

Example:

```
trait FormControls
{

    use Nepada\Bridges\BirthNumberInputForms\BirthNumberInputMixin;

    public function addContainer($name)
    {
        $control = new Container;
        $control->setCurrentGroup($this->getCurrentGroup());
        if ($this->currentGroup !== null) {
            $this->currentGroup->add($control);
        }
        return $this[$name] = $control;
    }

}

class Container extends Nette\Forms\Container
{

    use FormControls;

}

class Form extends Nette\Forms\Form
{

    use FormControls;

}
```

Usage
-----

[](#usage)

`BirthNumberInput` is form control that uses birth number value object to represent its value (see [nepada/birth-number](https://github.com/nepada/birth-number) for further details). It automatically validates the user input and `getValue()` method always returns `BirthNumber` instance, or `null` if the input is not filled.

```
$birthNumberInput = $form->addBirthNumber('birthNumber');
$birthNumberInput->setValue('invalid'); // \InvalidArgumentException is thrown
$birthNumberInput->setValue('000101 / 0009'); // the value is internally converted to BirthNumber value object
$birthNumberInput->getValue(); // BirthNumber instance for 000101/0009
```

### Client side validation

[](#client-side-validation)

#### Using precompiled bundle

[](#using-precompiled-bundle)

Using precompiled bundles is the quick'n'dirty way of getting client side validation to work.

```

```

#### Building your own bundle

[](#building-your-own-bundle)

It is highly recommended to install the client side package via nmp and compile your own bundle.

Here is an example script for initialization of birth number input and Nette forms.

```
import Nette from 'nette-forms';
import initializeBirthNumberInput from '@nepada/birth-number-input';

initializeBirthNumberInput(Nette);
Nette.initOnLoad();
```

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance79

Regular maintenance activity

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 69.7% 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 ~290 days

Recently: every ~282 days

Total

8

Last Release

176d ago

PHP version history (6 changes)v1.0.0PHP &gt;=7.4.0

v1.2.0PHP &gt;=7.4.0 &lt;8.2

v1.2.1PHP &gt;=7.4.0 &lt;8.3

v1.3.0PHP &gt;=8.1.0 &lt;8.4

v1.3.1PHP &gt;=8.1.0 &lt;8.5

v1.3.2PHP &gt;=8.1.0 &lt;8.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b4780fe328102c4572737db639653c29d3081d1d3e051467f00d7f09a776399?d=identicon)[xificurk](/maintainers/xificurk)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (184 commits)")[![xificurk](https://avatars.githubusercontent.com/u/117465?v=4)](https://github.com/xificurk "xificurk (80 commits)")

---

Tags

netteforminputbirth number

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/nepada-birth-number-input/health.svg)

```
[![Health](https://phpackages.com/badges/nepada-birth-number-input/health.svg)](https://phpackages.com/packages/nepada-birth-number-input)
```

###  Alternatives

[nette/php-generator

🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.5 features.

2.2k64.2M576](/packages/nette-php-generator)[robinherbots/jquery.inputmask

Inputmask is a javascript library which creates an input mask. Inputmask can run against vanilla javascript, jQuery and jqlite.

6.5k276.6k4](/packages/robinherbots-jqueryinputmask)[nette/code-checker

✅ Nette CodeChecker: A simple tool to check source code against a set of Nette coding standards.

881.7M6](/packages/nette-code-checker)[kartik-v/yii2-widget-rating

A Yii2 widget for the simple yet powerful bootstrap-star-rating plugin with fractional rating support (sub repo split from yii2-widgets)

444.1M8](/packages/kartik-v-yii2-widget-rating)[harvesthq/chosen

Chosen is a JavaScript plugin that makes select boxes user-friendly. It is currently available in both jQuery and Prototype flavors.

385.2M12](/packages/harvesthq-chosen)[kartik-v/yii2-widget-switchinput

A Yii2 wrapper widget for the Bootstrap Switch plugin to use checkboxes &amp; radios as toggle switchinputes (sub repo split from yii2-widgets)

384.4M13](/packages/kartik-v-yii2-widget-switchinput)

PHPackages © 2026

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