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(7mo ago)22.2k↓80%BSD-3-ClausePHPPHP &gt;=8.1.0 &lt;8.6CI passing

Since May 1Pushed 3w 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 today

READMEChangelog (8)Dependencies (21)Versions (18)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

53

—

FairBetter than 96% of packages

Maintenance82

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 69.2% 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

222d 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] (189 commits)")[![xificurk](https://avatars.githubusercontent.com/u/117465?v=4)](https://github.com/xificurk "xificurk (84 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.3k72.7M763](/packages/nette-php-generator)[nette/component-model

⚛ Nette Component Model

28817.0M106](/packages/nette-component-model)[nette/code-checker

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

911.7M6](/packages/nette-code-checker)[voda/date-input

HTML 5 compatible date / time input field for Nette.

1092.9k1](/packages/voda-date-input)

PHPackages © 2026

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