{"id":13801405,"url":"https://github.com/ethandunford/deno-validation","last_synced_at":"2025-05-13T11:31:08.596Z","repository":{"id":48092008,"uuid":"516500434","full_name":"ethandunford/deno-validation","owner":"ethandunford","description":"A general purpose validation library for Deno.","archived":false,"fork":false,"pushed_at":"2023-02-13T12:28:28.000Z","size":43,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-18T16:57:28.963Z","etag":null,"topics":["deno"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ethandunford.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-07-21T19:38:19.000Z","updated_at":"2023-01-24T19:01:47.000Z","dependencies_parsed_at":"2024-01-05T21:00:29.485Z","dependency_job_id":"a9021f84-9260-427f-87c1-7949c2afdfe0","html_url":"https://github.com/ethandunford/deno-validation","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethandunford%2Fdeno-validation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethandunford%2Fdeno-validation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethandunford%2Fdeno-validation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethandunford%2Fdeno-validation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethandunford","download_url":"https://codeload.github.com/ethandunford/deno-validation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253932819,"owners_count":21986454,"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":["deno"],"created_at":"2024-08-04T00:01:22.490Z","updated_at":"2025-05-13T11:31:06.608Z","avatar_url":"https://github.com/ethandunford.png","language":"TypeScript","funding_links":[],"categories":["Modules"],"sub_categories":["Utils"],"readme":"```\n            _ _     _       _   _             \n/\\   /\\__ _| (_) __| | __ _| |_(_) ___  _ __  \n\\ \\ / / _` | | |/ _` |/ _` | __| |/ _ \\| '_ \\ \n \\ V / (_| | | | (_| | (_| | |_| | (_) | | | |\n  \\_/ \\__,_|_|_|\\__,_|\\__,_|\\__|_|\\___/|_| |_|\n```\n\n# Validation\n\n[![language:language](https://img.shields.io/badge/language-deno-black)]()\n[![language:Github Actions](https://img.shields.io/badge/GithubActions-passing-green)]()\n\nA general purpose validation library for Deno.\n\n## Validators\n\nThis is the list of current validators\n\n| validator                 | description                                                                                    | example                                 |\n| ------------------------- | ---------------------------------------------------------------------------------------------- | --------------------------------------- |\n| isAlphanumeric            | checks that a string only contains alphanumeric characters                                     | hello                                   |\n| isNumeric                 | checks that a string only contains numeric characters                                          | 123                                     |\n| isSpecialCharacters       | checks that a string only contains special characters                                          | 1/()£$%^\"                               |\n| isEmpty                   | checks that a string is empty                                                                  | \"\"                                      |\n| isTitle                   | checks to against Mr, Ms, Mrs, Miss, Dr, Rev, Other                                            | Dr                                      |\n| isName                    | checks to see if name is valid                                                                 | Layhey                                  |\n| isEmail                   | checks to see if email is valid                                                                | test@test.com                           |\n| isMaritalStatus           | checks if string is a valid martial status single, married, civil partnered, divorced, widowed | single                                  |\n| isUkMobile                | only valid UK mobile numbers _(exludes Isle of Man)_                                           | 07100900023                             |\n| isUkPhone                 | only valid UK phone numbers                                                                    | 01603661068                             |\n| isUkNationalInsurance     | only valid UK national insurance numbers                                                       | SP939393H                               |\n| isUkPostCode              | only valid UK postcodes                                                                        | NR12PD                                  |\n| isLetterAndSpace          | checks to see if a string contains letters and spaces                                          | Jim Layhey                              |\n| isLetterAndSpaceAndNumber | checks to see if a string contains letters, spaces and numbers                                 | Randy Layhey 12                         |\n| isNumberAndSpace          | checks to see if a string contains numbers and spaces                                          | 1 2 3                                   |\n| isFloat                   | checks to see if a string is a valid float                                                     | 1.5                                     |\n| isLength                  | checks if string is between two values                                                         | foo, 1, 10                              |\n| isBetween                 | checks if number is between two values                                                         | 4, 0, 10                                |\n| isGreaterThan             | checks if number is greater than                                                               | 10, 4                                   |\n| isLessThan                | checks if number is less than                                                                  | 4, 10                                   |\n| isYesOrNo                 | checks that a string is yes or no                                                              | Yes                                     |\n| isValidJSON               | checks that a string is valid json                                                             | { \"example\": \"pass\" }                   |\n| isIpV4                    | checks that a string is a valid IP V4 address                                                  | 127.0.0.1                               |\n| isIpV6                    | checks that a string is a valid IP V6 address                                                  | 2001:0db8:85a3:0000:0000:8a2e:0370:7334 |\n| isUrl                     | checks that a string is a valid URL                                                            | https://deno.land/                      |\n| isDate                    | checks that a string is a valid Date                                                           | 2023-02-13, 2023/02/13                  |\n| isDateDDMMYYYY            | checks that a string is a valid Date DD-MM-YYYY                                                | 19-12-1989                              |\n\n## Usage\n\n```\nimport { isName } from \"https://raw.githubusercontent.com/ethandunford/deno-validation/main/src/validation.ts\";\n\n// true\nconsole.log(isName(\"Layhey\"))\n\n// false\nconsole.log(isName(String(1212)))\n```\n\n## Testing\n\n```\ndeno test src/tests/*.ts\n```\n\n## License\n\nApache License 2.0\n\n# Version\n\n2.0\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/ethandunford/deno-validation/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n- [ethandunford](https://github.com/ethandunford) Ethan Dunford - Creator\n- [anharmiah](https://github.com/AnharHussainMiah) Anhar Miah - Contributor\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethandunford%2Fdeno-validation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethandunford%2Fdeno-validation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethandunford%2Fdeno-validation/lists"}