{"id":23333484,"url":"https://github.com/fisss-apprentice/ulntools","last_synced_at":"2026-05-18T11:06:46.618Z","repository":{"id":56982224,"uuid":"355244125","full_name":"FISSS-Apprentice/ulnTools","owner":"FISSS-Apprentice","description":"Unique Learner Number (ULN) validator to validate as per the specification published ","archived":false,"fork":false,"pushed_at":"2022-05-10T09:00:20.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T14:28:43.147Z","etag":null,"topics":["composer","php","validation"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FISSS-Apprentice.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-06T15:43:55.000Z","updated_at":"2022-05-10T08:58:03.000Z","dependencies_parsed_at":"2022-08-21T08:50:50.846Z","dependency_job_id":null,"html_url":"https://github.com/FISSS-Apprentice/ulnTools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FISSS-Apprentice%2FulnTools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FISSS-Apprentice%2FulnTools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FISSS-Apprentice%2FulnTools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FISSS-Apprentice%2FulnTools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FISSS-Apprentice","download_url":"https://codeload.github.com/FISSS-Apprentice/ulnTools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648911,"owners_count":20972942,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["composer","php","validation"],"created_at":"2024-12-21T00:17:25.478Z","updated_at":"2026-05-18T11:06:41.600Z","avatar_url":"https://github.com/FISSS-Apprentice.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ulnTools\n\n\nULN (Unique Learner Number) tools to validate a uln as per the specification at \nhttps://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/710270/ULN_validation.pdf\n\nThe validator first checks if the ULN is in the correct format then calculates the checksum.\n\n\nUsage:\n\ninstall with composer\n```\ncomposer require fisss-apprentice/ulntools\n```\n\n\nthen use in a file\n\n```php\n\u003c?php\nrequire 'vendor/autoload.php'; // require composer dependencies\nuse UlnTools\\UlnValidation;\n\n$testUln=1000102504;\n$ulnValid = false;\n$errorMessage = '';\ntry {\n    $ulnValid = UlnValidation::validate($testUln);\n} catch (Exception $e) {\n    $errorMessage = $e-\u003egetMessage() .\"\\n\";\n}\n\nif (!$ulnValid) {\n    die('uln is not valid '.$errorMessage);\n}\n\n// too few digits\n$testUln=100010250;\n$ulnValid = false;\n$errorMessage = '';\ntry {\n    $ulnValid = UlnValidation::validate($testUln);\n} catch (Exception $e) {\n    $errorMessage = $e-\u003egetMessage() .\"\\n\";\n}\n\nif (!$ulnValid) {\n    die('uln is not valid '.$errorMessage);\n}\n\n```\n\n\nUlnValidation::validate returns true if a valid uln is provided\n\nan exception is thrown with more detail about problem contained in the exception message\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffisss-apprentice%2Fulntools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffisss-apprentice%2Fulntools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffisss-apprentice%2Fulntools/lists"}