nifptvalidator

package module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2021 License: MIT Imports: 1 Imported by: 0

README

NIF PT Validator

A portuguese NIF (Número de Identificação Fiscal) validator.

Usage

Get the package:
go get github.com/hugorosario/nifptvalidator
Import the validator
    import	"github.com/hugorosario/nifptvalidator"
Use it
    nif := "123456789"
    fmt.Println(nif, "=>", nifptvalidator.IsValidNif(nif))

MIT License

Documentation

Overview

Package nifptvalidator implements a validator for the Portuguese NIF (Número de Identificação Fiscal). It follow the specs defined in the wikipedia page at https://pt.wikipedia.org/wiki/N%C3%BAmero_de_identifica%C3%A7%C3%A3o_fiscal

Example:

package main

import (
	"fmt"

	"github.com/hugorosario/nifptvalidator"
)

func main() {
	nif := "123456789"
	fmt.Println(nif, "=>", nifptvalidator.IsValidNif(nif))
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidNif

func IsValidNif(nif string) bool

IsValidNif validates a NIF according to the rules specified in https://pt.wikipedia.org/wiki/N%C3%BAmero_de_identifica%C3%A7%C3%A3o_fiscal

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL