{"id":28372892,"url":"https://github.com/egressks/validator360","last_synced_at":"2026-02-09T04:30:49.874Z","repository":{"id":255954295,"uuid":"853926302","full_name":"EgressKS/Validator360","owner":"EgressKS","description":"Validator360 is a robust validation package that ensures data integrity by checking required fields, such as strings, objects, arrays, numbers, and more, to ensure they are not null, undefined, or empty. It also validates specific formats for emails, passwords,  phone numbers and url .","archived":false,"fork":false,"pushed_at":"2024-09-12T19:50:56.000Z","size":247,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-25T12:51:22.270Z","etag":null,"topics":["dynamic-validator","empty-check","jest-tests","nodejs","npm-package","null-check","validation-tool"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/EgressKS.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-07T23:22:33.000Z","updated_at":"2024-09-12T19:50:59.000Z","dependencies_parsed_at":"2024-09-13T00:51:39.666Z","dependency_job_id":null,"html_url":"https://github.com/EgressKS/Validator360","commit_stats":null,"previous_names":["dev-ks-155/validator360","egressks/validator360"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EgressKS/Validator360","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EgressKS%2FValidator360","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EgressKS%2FValidator360/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EgressKS%2FValidator360/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EgressKS%2FValidator360/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EgressKS","download_url":"https://codeload.github.com/EgressKS/Validator360/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EgressKS%2FValidator360/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267914696,"owners_count":24164771,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["dynamic-validator","empty-check","jest-tests","nodejs","npm-package","null-check","validation-tool"],"created_at":"2025-05-29T17:35:45.154Z","updated_at":"2026-02-09T04:30:49.848Z","avatar_url":"https://github.com/EgressKS.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Validotor360\r\n\r\nValidotor360 is a robust validation package that ensures data integrity by checking required fields, such as strings, objects, arrays, numbers, and more, to ensure they are not null, undefined, or empty. It also validates specific formats for emails, passwords, and phone numbers.\r\n\r\n## Installation\r\n\r\nTo install the package, run:\r\n\r\n```bash\r\nnpm install validotor360\r\n\r\n```\r\n## Validotor360 Service\r\n\r\n| NameOfService       | All Service                                                                                          |\r\n|---------------------|------------------------------------------------------------------------------------------------------|\r\n| `customValidation` | `addCustomValidator`, `validateWithCustom`                                                          |\r\n| `emptyValidation`  | `singleEmptyValidation`, `validateAllFields`                                                        |\r\n| `filetypeValidation`   | `validateSingleFileSize`, `validateFileSize`, `validateSingleMimeType`, `validateMimeTypes`         |\r\n| `regexFormatValidation`  | `validateEmail`, `validatePhone`, `validateURL`, `validatePassword`, `validateDate`, `validateCreditCard` |\r\n\r\n\r\n\r\n## Usage\r\nYou can import any of these functions based on your needs:\r\n``` \r\nconst { \r\n  customValidation, \r\n  emptyValidation, \r\n  filetypeValidation, \r\n  regexFormatValidation, \r\n} = require('validator360');\r\n\r\n// Example: Using regexValidation\r\nconst { validateEmail } = regexValidation;\r\n// Example: Using fileValidation\r\nconst {validateSingleFileSize , validateSingleMimeType} = fileValidation\r\n``` \r\nAlternatively, you can use direct imports:\r\n\r\n```\r\nconst { validateEmail } = require('validator360/regexFormatValidation');\r\nconst { singleEmptyValidation } = require('validator360/emptyValidation');\r\n\r\n```\r\n## Function Descriptions\r\n\r\n| Function Name            | Purpose                                                                                                     | Input                                                                                  | Example                                                                                                                                                        | Output                                                                                       |\r\n|--------------------------|-------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|\r\n| `singleEmptyValidation` | Validates if a single field is empty, null, or undefined.                                                 | - `value` (the value to check)\u003cbr\u003e- `fieldName` (the name of the field)\u003cbr\u003e- `customMessage` (Optional) | `const response = singleEmptyValidation(value, \"fieldName\", \"customMessage\");`                                                                             | - Returns: `\"{fieldName} is required\"` if empty.\u003cbr\u003e- Returns: `null` if valid.             |\r\n| `validateAllFields`      | Validates all fields in an object, checking if any are empty, null, or undefined.                           | - `data` (an object with key-value pairs)\u003cbr\u003e- `customMessage` (Optional)               | `const data = { stringFieldName: \"someValue\", arrayFieldName: [1, 2, 3], numberFieldName: 123 };\u003cbr\u003econst response = validateAllFields(data, \"customMessage\");` | - Returns an object with errors like:\u003cbr\u003e```{ fieldName1: \"fieldName1 is required\", fieldName2: \"fieldName2 is required\" }``` |\r\n| `validateEmail`          | Validates the format of an email address.                                                                  | - `email` (the email address to validate)\u003cbr\u003e- `userRegix` (Optional)                  | `const response = validateEmail(email, userRegix);`                                                                                                         | - Returns: `true` if correct format.\u003cbr\u003e- Returns: `false` if incorrect format.             |\r\n| `validatePhone`          | Validates if the phone number format is correct.                                                           | - `phone` (the phone number to validate)\u003cbr\u003e- `userRegix` (Optional)                   | `const response = validatePhone(phone, userRegix);`                                                                                                         | - Returns: `true` if correct format.\u003cbr\u003e- Returns: `false` if incorrect format.             |\r\n| `validateURL`            | Validates if the URL format is correct.                                                                    | - `url` (the URL to validate)\u003cbr\u003e- `userRegix` (Optional)                              | `const response = validateURL(url, userRegix);`                                                                                                             | - Returns: `true` if correct format.\u003cbr\u003e- Returns: `false` if incorrect format.             |\r\n| `validatePassword`       | Validates if the password format meets the required criteria (e.g., length, special characters).            | - `password` (the password to validate)\u003cbr\u003e- `userRegix` (Optional)                    | `const response = validatePassword(password, userRegix);`                                                                                                   | - Returns: `true` if correct format.\u003cbr\u003e- Returns: `false` if incorrect format.             |\r\n| `validateDate`           | Validates if the date format is correct.                                                                   | - `date` (the date to validate)\u003cbr\u003e- `userRegix` (Optional)                            | `const response = validateDate(date, userRegix);`                                                                                                           | - Returns: `true` if correct format.\u003cbr\u003e- Returns: `false` if incorrect format.             |\r\n| `validateSingleMimeType` | Validates if a single file's MIME type is allowed.                                                         | - `file` (the file to check)\u003cbr\u003e- `allowedTypes` (an array of allowed MIME types)     | `const isValid = validateSingleMimeType(file, ['image/jpeg', 'image/png']);`                                                                             | - Returns: `true` if MIME type is allowed.\u003cbr\u003e- Returns: `false` if MIME type is not allowed. |\r\n| `validateMimeTypes`      | Validates the MIME types of multiple files.                                                                | - `files` (an array of files)\u003cbr\u003e- `allowedTypes` (an array of allowed MIME types)    | `const response = validateMimeTypes(files, ['image/jpeg', 'image/png']);`                                                                                 | - Returns an object with filenames and validity status:\u003cbr\u003e```{ filename1: true, filename2: false }``` |\r\n| `validateSingleFileSize` | Validates if a single file's size is within the allowed limit.                                            | - `file` (the file to check)\u003cbr\u003e- `maxSizeMB` (maximum allowed file size in MB)       | `const isValid = validateSingleFileSize(file, 5);`                                                                                                         | - Returns: `true` if file size is within limit.\u003cbr\u003e- Returns: `false` if file size exceeds limit. |\r\n| `validateFileSize`       | Validates the sizes of multiple files.                                                                     | - `files` (an array of files)\u003cbr\u003e- `maxSizeMB` (maximum allowed file size in MB)      | `const response = validateFileSize(files, 5);`                                                                                                            | - Returns an object with filenames and validity status:\u003cbr\u003e```{ filename1: true, filename2: false }``` |\r\n| `addCustomValidator`    | Adds a custom validation function to the store.                                                           | - `name` (name of the custom validator)\u003cbr\u003e- `validatorFunction` (function to validate) | `addCustomValidator('customName', customFunction);`                                                                                                        | - No return value. Adds a custom validator to the store.                                     |\r\n| `validateWithCustom`    | Validates a value using a custom validator from the store.                                               | - `name` (name of the custom validator)\u003cbr\u003e- `value` (value to validate)\u003cbr\u003e- `...args` (additional arguments) | `const response = validateWithCustom('customName', value, ...args);`                                                                                     | - Returns the result of the custom validator function.                                        \r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegressks%2Fvalidator360","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fegressks%2Fvalidator360","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fegressks%2Fvalidator360/lists"}