Files
gofatqr/nif.go
T
esilva f61535e7e7 Basic functionality
User can pass a string to the Scanner and get the struced filled
2025-09-05 18:51:51 +01:00

25 lines
362 B
Go

package gofatqr
import (
"unicode"
)
// TODO
// Add a way to check with an API or whatever like nif.pt
// Also need to be able to indentify other countries NIFs I guess
// some validation at the end
func isValidNIF(n string) bool {
if len(n) != 9 {
return false
}
for _, c := range n {
if !unicode.IsDigit(c) {
return false
}
}
return true
}