Validate common polish numbers.
Supported:
- NIP (Numer Identyfikacji Podatkowej)
- REGON (Rejestr Gospodarki Narodowej)
- PESEL (Powszechny Elektroniczny System Ewidencji Ludności)
makefile is prepared to execute on podman / podman-compose if you're running docker please replace podman-compose with docker-compose
Execute this command to build and start service
make up
curl --request POST \
--url http://localhost:8080/validate \
--header 'Content-Type: application/json' \
--data '{
"value": "96030700272"
}'
[
{
"country": "PL",
"identifier": "NIP",
"isValid": false,
"Warnings": [
"Missing country identifier at beginning."
],
"Error": "Invalid input length.",
"CleanedInput": "96030700272"
},
{
"country": "PL",
"identifier": "PESEL",
"isValid": true,
"Warnings": [
"Missing country identifier at beginning."
],
"Error": "",
"CleanedInput": "96030700272"
},
{
"country": "PL",
"identifier": "REGON",
"isValid": false,
"Warnings": [
"Missing country identifier at beginning."
],
"Error": "Invalid input length.",
"CleanedInput": "96030700272"
}
]