{"id":20449771,"url":"https://github.com/sandshellcreations/validationexampleswift","last_synced_at":"2025-10-27T20:32:36.232Z","repository":{"id":143708818,"uuid":"103498384","full_name":"SandsHellCreations/ValidationExampleSwift","owner":"SandsHellCreations","description":"This project contains single generic validations file that can be used for validations on login, signup process or form validations. only one function can work for all view controller validations e.g. there is only one function that is used for login View Controller, signup ViewController and editProfile ViewController also. i've handled the validation cases for email, phone number, name etc. you can add your other RegExes in this file for other validations.","archived":false,"fork":false,"pushed_at":"2017-09-15T06:19:59.000Z","size":18,"stargazers_count":14,"open_issues_count":1,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T19:45:35.307Z","etag":null,"topics":["ios","iosdevelopment","kissmycode","sandshellcreations","swift3","tuples","validationexampleswift","validations","validator","xcode"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SandsHellCreations.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-09-14T07:07:24.000Z","updated_at":"2020-05-01T12:22:33.000Z","dependencies_parsed_at":"2023-04-14T02:03:23.554Z","dependency_job_id":null,"html_url":"https://github.com/SandsHellCreations/ValidationExampleSwift","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/SandsHellCreations%2FValidationExampleSwift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SandsHellCreations%2FValidationExampleSwift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SandsHellCreations%2FValidationExampleSwift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SandsHellCreations%2FValidationExampleSwift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SandsHellCreations","download_url":"https://codeload.github.com/SandsHellCreations/ValidationExampleSwift/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248654090,"owners_count":21140236,"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":["ios","iosdevelopment","kissmycode","sandshellcreations","swift3","tuples","validationexampleswift","validations","validator","xcode"],"created_at":"2024-11-15T10:44:32.660Z","updated_at":"2025-10-27T20:32:36.180Z","avatar_url":"https://github.com/SandsHellCreations.png","language":"Swift","readme":"ValidationExampleSwift\nValidation code using tuples and variadic parameters...\n\nVariadic parameter example:-\n--------------------------------------------------------------------\n    func arithmeticMean(_ numbers: Double...) -\u003e Double {\n        var total: Double = 0\n        for number in numbers {\n            total += number\n        }\n    return total / Double(numbers.count)\n    }\n    arithmeticMean(1, 2, 3, 4, 5)\n    // returns 3.0, which is the arithmetic mean of these five numbers\n    arithmeticMean(3, 8.25, 18.75)\n    // returns 10.0, which is the arithmetic mean of these three numbers\nTuple usage tutorial link: https://medium.com/swift-programming/swift-tuple-328aecff50e7\n----------------------------------------------------------------------\nUsage Example of validation with three values\n----------------------------------------------------------------------\n    let response = Validation.shared.validate(values: (ValidationType.email, \"hello@gmail.com\"), (ValidationType.phoneNo, \"56545654654665\"), (ValidationType.stringWithFirstLetterCaps, \"tyh56gf\"))\n        switch response {\n        case .success:\n            break\n        case .failure(_, let message):\n            print(message.localized())\n        }\nonly with two value validations\n----------------------------------------------------------------------\n    let response = Validation.shared.validate(values: (ValidationType.email, \"hello@gmail.com\"), (ValidationType.stringWithFirstLetterCaps, \"tyh56gf\"))\n        switch response {\n        case .success:\n            break\n        case .failure(_, let message):\n            print(message.localized())\n        }\n\n    \n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandshellcreations%2Fvalidationexampleswift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandshellcreations%2Fvalidationexampleswift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandshellcreations%2Fvalidationexampleswift/lists"}