Checker/validator for Hong Kong IDs

hkidchecker

Checker/validator for Hong Kong IDs

Description

This Go package validates Hong Kong ID card IDs. Useful for example for validating form input.

Getting Started

Installing

go get -u github.com/PatrLind/hkidchecker

Example

package main

import (
    "fmt"

    "github.com/PatrLind/hkidchecker"
)

func main() {
    hkid := "E364912(5)"
    valid := hkidchecker.CheckHKID(hkid)
    fmt.Printf("HKID '%s' valid: %t\n", hkid, valid)
}

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Owner
Patrik Lindahl
Swedish software developer currently working for onActivity Limited in Hong Kong. Ham radio call signs: SA4LGZ, VR2WGZ
Patrik Lindahl
Similar Resources

Iran National Id, Bank Card Number, Mobile Number Validator for golang

Iran IDValidator Iran National Id, Bank Card Number, Mobile Number Validator for golang Installation go get -u github.com/mohammadv184/idvalidator Us

Dec 20, 2021

Gin Middleware to extract json tag value from playground validator's errors validation

Json Tag Extractor for Go-Playground Validator This is Gin Middleware that aim to extract json tag and than store it to FieldError.Field() object. Ins

Jan 14, 2022

Validator - Replace the validation framework used by gin

validator Replace the validation framework used by gin replace mod:replace githu

Jan 18, 2022

A lightweight model validator written in Go.

validator A lightweight model validator written in Go. quickstart package main import ( "fmt" v "github.com/go-the-way/validator" ) func main() {

Sep 27, 2022

Mango-kong - Mango (man page generator) integration for Kong

Mango-kong - Mango (man page generator) integration for Kong

Mango (man page generator) integration for Kong This package allows Kong package

Dec 5, 2022

go-playground-converter is formatter error response inspiration like express-validator in nodejs build on top go-playground-validator.

Go Playground Converter go-playground-converter is formatter error response inspiration like express-validator in nodejs build on top in go-playground

Dec 9, 2022

Traefik config validator: a CLI tool to (syntactically) validate your Traefik configuration filesTraefik config validator: a CLI tool to (syntactically) validate your Traefik configuration files

Traefik config validator: a CLI tool to (syntactically) validate your Traefik configuration filesTraefik config validator: a CLI tool to (syntactically) validate your Traefik configuration files

Traefik Config Validator Note This is currently pre-release software. traefik-config-validator is a CLI tool to (syntactically) validate your Traefik

Dec 16, 2021

Snake-validator - Snake validator with golang

snake-validator Overview The concept of Snake (the video game) has been around s

Jan 22, 2022

🧀 Formaggo is a simple model checker inspired by TLA+, The checker and the models are written in Go

🧀 Formaggo. A cheesy exhaustive state checker in Go. Formaggo is a simple model checker inspired by TLA+. The checker and the models are written in G

Jan 23, 2022

Kong is a command-line parser for Go

Kong is a command-line parser for Go

Kong is a command-line parser for Go Introduction Help Help as a user of a Kong application Defining help in Kong Command handling Switch on the comma

Dec 27, 2022

Golang Integration Testing Framework For Kong Kubernetes APIs and Controllers.

Golang Integration Testing Framework For Kong Kubernetes APIs and Controllers.

Kong Kubernetes Testing Framework (KTF) Testing framework used by the Kong Kubernetes Team for the Kong Kubernetes Ingress Controller (KIC). Requireme

Dec 20, 2022

Kong Verifier plugin for HSDP API signed requests

Kong Verifier plugin for HSDP API signed requests

Jan 7, 2022

Kong and Consul Lab For Golang

Kong and Consul Lab Prerequisites docker Deploy Consul Server docker run -d -p 8500:8500 -p 8600:8600/udp --name=consul-server consul agent -server -u

Nov 25, 2021

Kong Api Gateway Plugins for golang

Prerequisites: Windows Docker. Build Command: docker build -t kong-plugins . Run Command: docker run -ti --rm --name kong-plugins -e "KONG_DATABASE=of

Aug 3, 2022

ID type with marshalling to/from hash to prevent sending IDs to clients.

ID type with marshalling to/from hash to prevent sending IDs to clients.

Hide IDs Hide is a simple package to provide an ID type that is marshalled to/from a hash string. This prevents sending technical IDs to clients and c

Dec 10, 2022

Super short, fully unique, non-sequential and URL friendly Ids

Generator of unique non-sequential short Ids The package shortidenables the generation of short, fully unique, non-sequential and by default URL frien

Dec 30, 2022

Compact, sortable and fast unique IDs with embedded metadata.

Compact, sortable and fast unique IDs with embedded metadata.

A spec for unique IDs in distributed systems based on the Snowflake design, i.e. a coordination-based ID variant. It aims to be friendly to both machi

Dec 22, 2022

A simple to use Go (golang) package to generate or parse Twitter snowflake IDs

snowflake snowflake is a Go package that provides A very simple Twitter snowflake generator. Methods to parse existing snowflake IDs. Methods to conve

Dec 30, 2022

✨ Generate unique IDs (Port of Node package "generate-snowflake" to Golang)

✨ Generate Snowflake Generate unique IDs. Inspired by Twitter's Snowflake system. 📦 Installation Initialize your project (go mod init example.com/exa

Feb 11, 2022
:balloon: A lightweight struct validator for Go

gody Go versions supported Installation go get github.com/guiferpa/gody/v2 Usage package main import ( "encoding/json" "fmt" "net/http"

Nov 19, 2022
jio is a json schema validator similar to joi
jio is a json schema validator similar to joi

jio Make validation simple and efficient ! 中文文档 Why use jio? Parameter validation in Golang is really a cursing problem. Defining tags on structs is n

Dec 25, 2022
A norms and conventions validator for Terraform

This tool will help you ensure that a terraform folder answer to your norms and conventions rules. This can be really useful in several cases : You're

Nov 29, 2022
Golang parameter validation, which can replace go-playground/validator, includes ncluding Cross Field, Map, Slice and Array diving, provides readable,flexible, configurable validation.
Golang parameter validation, which can replace go-playground/validator, includes ncluding Cross Field, Map, Slice and Array diving, provides readable,flexible, configurable validation.

Checker 中文版本 Checker is a parameter validation package, can be use in struct/non-struct validation, including cross field validation in struct, elemen

Dec 16, 2022
golang request validator

validator Golang 参数验证器,目前只支持POST请求,JSON格式参数验证 亮点 1、验证时只要有一个错误,错误信息立即返回 2、可自定义参数别名显示错误信息;详情见_example文件 使用 go mod -u github.com/one-gold-coin/validator

Sep 30, 2021
golang rule-based string validator

gosv golang rule-based string validator usage import "github.com/s0rg/gosv" var MyRules = []gosv.Rule{ gosv.MinLen(8), gosv.MaxLen(64), gosv.MinLo

Nov 20, 2021
The Hyperscale InputFilter library provides a simple inputfilter chaining mechanism by which multiple filters and validator may be applied to a single datum in a user-defined order.

Hyperscale InputFilter Branch Status Coverage master The Hyperscale InputFilter library provides a simple inputfilter chaining mechanism by which mult

Oct 20, 2021
OpenShift OLM Catalog Validator

OpenShift OLM Catalog Validator Overview It is an external validator which can be used with Operator-SDK to check the vendor-like criteria to publish

Nov 22, 2021
Vat ID Validator for Germany

German Vat Validator service This project has been developed using Hexagonal architecture and repository pattern. How to run? docker-compose up -d Cal

Nov 4, 2021
A demo project shows how to use validator to validate parameters

validator-demo This project is a demo project shows how to use validator to validate parameters use case install requirements go get github.com/favadi

Jan 10, 2022