{"id":2953,"url":"https://github.com/PiXeL16/PasswordTextField","last_synced_at":"2025-08-06T16:31:41.243Z","repository":{"id":54157757,"uuid":"51423484","full_name":"PiXeL16/PasswordTextField","owner":"PiXeL16","description":"A custom TextField with a switchable icon which shows or hides the password and enforce good password policies","archived":false,"fork":false,"pushed_at":"2024-06-01T09:51:53.000Z","size":4656,"stargazers_count":310,"open_issues_count":2,"forks_count":46,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-07-06T06:42:49.391Z","etag":null,"topics":["carthage","cocoapods","custom-textfield","password","passwordtextfield","swift","textfield"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/PiXeL16.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":"2016-02-10T05:50:12.000Z","updated_at":"2024-09-17T17:04:44.000Z","dependencies_parsed_at":"2023-10-14T18:29:57.979Z","dependency_job_id":"27335268-059b-4fe0-bd06-01636188e94d","html_url":"https://github.com/PiXeL16/PasswordTextField","commit_stats":{"total_commits":85,"total_committers":11,"mean_commits":"7.7272727272727275","dds":0.2823529411764706,"last_synced_commit":"d27d19a4ac3279e3c198fe706f82b1a78d8e0040"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/PiXeL16/PasswordTextField","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiXeL16%2FPasswordTextField","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiXeL16%2FPasswordTextField/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiXeL16%2FPasswordTextField/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiXeL16%2FPasswordTextField/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PiXeL16","download_url":"https://codeload.github.com/PiXeL16/PasswordTextField/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PiXeL16%2FPasswordTextField/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269112520,"owners_count":24361990,"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-08-06T02:00:09.910Z","response_time":99,"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":["carthage","cocoapods","custom-textfield","password","passwordtextfield","swift","textfield"],"created_at":"2024-01-05T20:16:27.269Z","updated_at":"2025-08-06T16:31:40.864Z","avatar_url":"https://github.com/PiXeL16.png","language":"Swift","funding_links":[],"categories":["UI","Libs","Swift","UI [🔝](#readme)"],"sub_categories":["TextField \u0026 TextView","UI","Layout","Other free courses"],"readme":"![PasswordTextFieldBanner](Art/passwordTextFieldBanner.png)\n\n[![Build Status](https://travis-ci.org/PiXeL16/PasswordTextField.svg?branch=master)](https://travis-ci.org/PiXeL16/PasswordTextField/) [![codecov.io](https://codecov.io/github/PiXeL16/PasswordTextField/coverage.svg?branch=master)](https://codecov.io/github/PiXeL16/PasswordTextField?branch=master)\n    [![Swift Package Manager](https://img.shields.io/badge/Swift_Package_Manager-compatible-orange?style=flat-square)](https://img.shields.io/badge/Swift_Package_Manager-compatible-orange?style=flat-square)\n    [![CocoaPods Compatible](https://img.shields.io/cocoapods/v/PasswordTextField.svg)](https://img.shields.io/cocoapods/v/PasswordTextField.svg) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/matteocrippa/awesome-swift) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/PiXeL16/PasswordTextField/master/LICENSE)\n[![Language](https://img.shields.io/badge/language-Swift%205.0-orange.svg)](https://swift.org)\n\n# PasswordTextField\nA custom TextField with a switchable icon which shows or hides the password and enforces good password policies,  written in `Swift`.\n\n![PasswordTextFieldGif](Web/PasswordTextField.gif)\n\n\n:star: Features\n---\n* Custom toggle icon in IB or programmatically.\n* Custom icon color in IB or programmatically.\n* Custom password validation rules.\n* Custom password validation error message.\n* Control when to show the icon, while editing, always or never.\n\n:octocat: Installation\n---\n\n#### Swift Package Manager (SPM)\n\n1. In Xcode 11+ select *File \u003e Packages \u003e Add Package Dependency...*.\n2. Enter this project's URL: https://github.com/PiXeL16/PasswordTextField.git\n\n#### CocoaPods\nYou can use [CocoaPods](http://cocoapods.org/) to install `PasswordTextField` by adding it to your `Podfile`:\n\n```ruby\nplatform :ios, '12.0'\nuse_frameworks!\npod 'PasswordTextField'\n```\n\nTo get the full benefits import `PasswordTextField` wherever you import UIKit\n\n``` swift\nimport UIKit\nimport PasswordTextField\n```\n#### Carthage\nCreate a `Cartfile` that lists the framework and run `carthage bootstrap`. Follow the [instructions](https://github.com/Carthage/Carthage#if-youre-building-for-ios) to add `$(SRCROOT)/Carthage/Build/iOS/PasswordTextField.framework` to an iOS project.\n\n```\ngithub \"PiXeL16/PasswordTextField\"\n```\n\n#### Manually\n1. Download and drop ```/PasswordTextField``` folder  in your project.  \n2. Congratulations!  \n\n:metal: Usage\n---\n1. Open a storyboard or Xib file.\n2. Drag and drop a `UITextField` to a ViewController.\n3. In Identity Inspector, replace the class from `UITextField` to `PasswordTextField` and the module to `PasswordTextField`.\n4. Configure your properties in the Attribute Inspector.\n\n![Screenshot](Web/storyboardScreenshot.png)\n\n## Properties\n\n| Property name | Data type | Remark |\n| ------------- |:-------------:| ----- |\n| Show Toggle Button While | String | Possible values are `editing`(default), `always`, `never` |\n| Image Tint Color | UIColor | The color off the Toggle image, the functionality use `UIImageRenderingMode.AlwaysTemplate` to change the default or custom image color|\n|Custom Show Secure Text Image| UIImage| Your custom image to show the secure text|\n|Custom Hide Secure Text Image| UIImage| Your custom image to hide the secure text|\n\n## Validation\n\n`PasswordTextField` also provides functionality to enforce good password policies.\n\nIt will currently validate that the password format is `at least 8 characters long and contain one uppercase letter and one number`.\n\n```swift\nimport PasswordTextField\n\nif passwordTextField.isInvalid(){\n  print(passwordTextField.errorMessage)\n}\n```\n\nYou can also provide your custom password validation format (with Regex) and error message:\n\n```swift\nimport PasswordTextField\n\nlet validationRule = RegexRule(regex:\"^[A-Z ]+$\", errorMessage: \"Password must contain only uppercase letters\")\n\npasswordTextField.validationRule = validationRule\n\nif passwordTextField.isInvalid(){\n  print(passwordTextField.errorMessage)\n}\n```\n\nTODO\n-----\n* Show indication when password is strong or weak in TextField\n* Animation when toggling Button\n\n\n\n:alien: Author\n------\nChris Jimenez - http://code.chrisjimenez.net, [@chrisjimeneznat](http://twitter.com/chrisjimeneznat)\n\n:beer: Donate\n------\nIf you want to buy me a beer, you can donate to my coin addresses below:\n#### BTC\n1BeGBew4CBdLgUSmvoyiU1LrM99GpkXgkj\n#### ETH\n0xa59a3793E3Cb5f3B1AdE6887783D225EDf67192d\n#### LTC\nLd6FB3Tqjf6B8iz9Gn9sMr7BnowAjSUXaV\n\n## License\n`PasswordTextField` is released under the MIT license. See [LICENSE](https://github.com/pixel16/PasswordTextField/blob/master/LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPiXeL16%2FPasswordTextField","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPiXeL16%2FPasswordTextField","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPiXeL16%2FPasswordTextField/lists"}