czech 1.0.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 61

czech

Set of Czechia-specific Dart functions.

At this point - validation of frequently used values:

  • personal ID (rodné číslo)
  • company ID (IČ)
  • bank account (číslo účtu)

Usage

A simple usage example:

import 'package:czech/czech.dart' as cz;

main() {

  // a.k.a Rodné číslo
  if (cz.isCzechPersonalIdNumber("780324/6543")) {
    print("Valid!");
  }

  // a.k.a. IČ
  if (cz.isCzechCompanyIdNumber("04626133")) {
    print("Valid!");
  }

  // a.k.a. Číslo účtu - with bank code by default
  if (cz.isCzechBankAccount("3033/2700")) {
    print("Valid!");
  }

  // a.k.a. Číslo účtu - without a bank code
  if (cz.isCzechBankAccount("3033", withBankCode: false)) {
    print("Valid!");
  }

}

Attributions

Based on analysis by David Grudl: https://phpfashion.com/jak-overit-platne-ic-a-rodne-cislo

Features and bugs

Please file feature requests and bugs at the issue tracker.

Changelog

1.0.0

  • upgrade to Dart2

0.1.1

  • Initial version, created by Stagehand
  • Czech validators

example/czech_example.dart

// Copyright (c) 2017, tomucha. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

import 'package:czech/czech.dart' as cz;

main() {

  // a.k.a Rodné číslo
  if (cz.isCzechPersonalIdNumber("780324/6543")) {
    print("Valid!");
  }

  // a.k.a. IČ
  if (cz.isCzechCompanyIdNumber("04626133")) {
    print("Valid!");
  }

  // a.k.a. Číslo účtu - with bank code by default
  if (cz.isCzechBankAccount("3033/2700")) {
    print("Valid!");
  }

  // a.k.a. Číslo účtu - without a bank code
  if (cz.isCzechBankAccount("3033", withBankCode: false)) {
    print("Valid!");
  }

}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  czech: ^1.0.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:czech/czech.dart';
  
Version Uploaded Documentation Archive
1.0.0 Aug 13, 2018 Go to the documentation of czech 1.0.0 Download czech 1.0.0 archive
0.1.2 Apr 16, 2017 Go to the documentation of czech 0.1.2 Download czech 0.1.2 archive
0.1.1 Apr 14, 2017 Go to the documentation of czech 0.1.1 Download czech 0.1.1 archive
0.0.9 Apr 13, 2017 Go to the documentation of czech 0.0.9 Download czech 0.0.9 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
31
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
61
Learn more about scoring.

We analyzed this package on Oct 10, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.12.4

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:czech/czech.dart.

Maintenance suggestions

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.61.0 <3.0.0
Dev dependencies
test ^1.3.0