Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
193 changes: 193 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
{
"version": "0.2",
"language": "en",
"allowCompoundWords": true,
"files": [
"**/*.{swift,md,yml,yaml,json,txt,podspec}"
],
"words": [
"Skyflow",
"skyflow",
"skyflowapi",
"skyflow-iOS",
"skyflow-ios",
"skyflow-android",
"skyflow-node",
"detokenize",
"detokenizing",
"detokenized",
"tokenize",
"tokenized",
"tokenization",
"tokenProvider",
"TokenProvider",
"retokenize",
"de-identify",
"re-identify",
"deidentify",
"reidentify",
"upsert",
"upserting",
"upserted",
"vaultID",
"vaultURL",
"vaultId",
"vaultUrl",
"skyflowID",
"skyflow_id",
"skyflowIds",
"getById",
"getByID",
"invokeConnection",
"bearerToken",
"getBearerToken",
"altText",
"setAltText",
"clearAltText",
"setToken",
"setValue",
"clearValue",
"setError",
"resetError",
"enableCopy",
"enableCardIcon",
"cardMetadata",
"cardMetaData",
"CardMetadata",
"CardType",
"CARDHOLDER",
"MASTERCARD",
"HIPERCARD",
"UNIONPAY",
"MAESTRO",
"AMEX",
"DINERS",
"BYOT",
"redaction",
"RedactionType",
"REDACTED",
"MASKED",
"composable",
"Composable",
"getComposableView",
"composableLayout",
"unmount",
"unmounted",
"programmatically",
"ValidationSet",
"LengthMatchRule",
"RegexMatchRule",
"ElementValueMatchRule",
"SkyflowError",
"SkyflowErrorCode",
"logLevel",
"LogLevel",
"ElementType",
"ContainerType",
"ContainerOptions",
"CollectContainer",
"RevealContainer",
"RevealElement",
"CollectElement",
"CollectOptions",
"CollectElementInput",
"CollectElementOptions",
"RevealElementInput",
"RevealElementOptions",
"ContextOptions",
"CardIconAlignment",
"AEXML",
"xcodeproj",
"xcworkspace",
"xcassets",
"xctestplan",
"cocoapods",
"CocoaPods",
"Podfile",
"podspec",
"addArrangedSubview",
"addSubview",
"UIKit",
"UIView",
"UIColor",
"UIFont",
"UIEdgeInsets",
"UIStackView",
"UILabel",
"NSTextAlignment",
"CALayer",
"CGFloat",
"NSLocalizedDescriptionKey",
"NSUUID",
"URLSession",
"JSONSerialization",
"isFirstResponder",
"resignFirstResponder",
"Luhn",
"checkSum",
"CCPA",
"LangAndVersion",
"GILLSANSCE",
"binlookup",
"getComposableLayout",
"CARTES_BANCAIRES",
"DINERS_CLUB",
"organisation",
"Bharti",
"Sagar",
"Verma",
"Akhil",
"Tejesh",
"Reddy",
"Allampati",
"bstyle",
"MMYY",
"mmyy",
"YYMM",
"yymm",
"customise",
"behaviour",
"xxxxxxer",
"XCUI",
"cgColor",
"UIMenu",
"Astrisk",
"astrisk",
"requiredAstrisk",
"abcfgdyt",
"istyle",
"Bobb",
"ifields"
],
"languageSettings": [
{
"languageId": "swift",
"locale": "*",
"ignoreRegExpList": [
"/\\b[A-Z][A-Z0-9_]{2,}\\b/g",
"/^import\\s+.*/m"
]
}
],
"ignorePaths": [
".git/**",
".github/**",
".build/**",
".swiftpm/**",
"*.lock",
"*.log",
"**/*.xcodeproj/**",
"**/*.xcworkspace/**",
"**/Pods/**",
"build/**",
"**/build/**",
"Rule/**",
"**/*.plist"
],
"ignoreRegExpList": [
"/#[0-9a-fA-F]{3,8}\\b/g",
"/(eyJ[A-Za-z0-9+/=_-]+\\.)+[A-Za-z0-9+/=_-]+/g",
"/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi",
"/[A-Za-z0-9_.~-]*%[0-9A-Fa-f]{2}[A-Za-z0-9_.~%-]*/g"
]
}
12 changes: 12 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,17 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}

spellcheck:
name: Run spellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: streetsidesoftware/cspell-action@v8
with:
config: .cspell.json
strict: true
inline: error
incremental_files_only: false



2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ All notable changes to this project will be documented in this file.
- Validation to token obtained from `tokenProvider`

### Fixed
- Request headers not getting overriden due to case sensitivity
- Request headers not getting overridden due to case sensitivity

## [1.12.0] - 2022-02-24

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ skyflowClient.insert(records: records, options: insertOptions, callback: insertC

### Step 1: Create a container

First create a **container** for the form elements using the ```skyflowClient.container(type: Skyflow.ContainerType)``` method as show below
First create a **container** for the form elements using the ```skyflowClient.container(type: Skyflow.ContainerType)``` method as shown below

```swift
let container = skyflowClient.container(type: Skyflow.ContainerType.COLLECT)
Expand Down Expand Up @@ -563,7 +563,7 @@ You can update the data in a vault with Skyflow Elements. Use the following step

### Step 1: Create a container

First create a **container** for the form elements using the ```skyflowClient.container(type: Skyflow.ContainerType)``` method as show below
First create a **container** for the form elements using the ```skyflowClient.container(type: Skyflow.ContainerType)``` method as shown below

```swift
let container = skyflowClient.container(type: Skyflow.ContainerType.COLLECT)
Expand Down Expand Up @@ -811,7 +811,7 @@ let confirmPasswordInput = CollectElementInput(
)
let confirmPassword = container?.create(input: confirmPasswordInput, options: collectElementOptions)

// mount elements on screen - errors will be shown if any of the validaitons fail
// mount elements on screen - errors will be shown if any of the validations fail
stackView.addArrangedSubview(password!)
stackView.addArrangedSubview(confirmPassword!)
```
Expand Down Expand Up @@ -931,7 +931,7 @@ cardHolderName.on(eventName: Skyflow.EventName.CHANGE) { state in

Helps to display custom error messages on the Skyflow Elements through the methods `setError` and `resetError` on the elements.

`setError(error: String)` method is used to set the error text for the element, when this method is trigerred, all the current errors present on the element will be overridden with the custom error message passed. This error will be displayed on the element until `resetError()` is trigerred on the same element.
`setError(error: String)` method is used to set the error text for the element, when this method is triggered, all the current errors present on the element will be overridden with the custom error message passed. This error will be displayed on the element until `resetError()` is triggered on the same element.

`resetError()` method is used to clear the custom error message that is set using `setError`.

Expand Down Expand Up @@ -1014,7 +1014,7 @@ Composable Elements combine multiple Skyflow Elements in a single row. The follo

### Step 1: Create a composable container

First create a **container** for the form elements using the ```skyflowClient.container(type: Skyflow.ContainerType)``` method as show below
First create a **container** for the form elements using the ```skyflowClient.container(type: Skyflow.ContainerType)``` method as shown below

```swift
let container = skyflowClient.container(type: Skyflow.ContainerType.COMPOSABLE, options: ContainerOptions)
Expand Down Expand Up @@ -1590,7 +1590,7 @@ composableContainer?.on(eventName: .SUBMIT){
Composable Elements combine multiple Skyflow Elements in a single row. The following steps create a composable element and securely update data through it.

### Step 1: Create a composable container
First create a **container** for the form elements using the ```skyflowClient.container(type: Skyflow.ContainerType)``` method as show below
First create a **container** for the form elements using the ```skyflowClient.container(type: Skyflow.ContainerType)``` method as shown below

```swift
var containerOptions = ContainerOptions(
Expand Down Expand Up @@ -2148,7 +2148,7 @@ container.reveal(callback: revealCallback)

Helps to display custom error messages on the Skyflow Elements through the methods `setError` and `resetError` on the elements.

`setError(error: String)` method is used to set the error text for the element, when this method is trigerred, all the current errors present on the element will be overridden with the custom error message passed. This error will be displayed on the element until `resetError()` is trigerred on the same element.
`setError(error: String)` method is used to set the error text for the element, when this method is triggered, all the current errors present on the element will be overridden with the custom error message passed. This error will be displayed on the element until `resetError()` is triggered on the same element.

`resetError()` method is used to clear the custom error message that is set using `setError`.

Expand Down Expand Up @@ -2189,7 +2189,7 @@ let cardNumberInput = Skyflow.RevealElementInput(
errorTextStyles: errorTextStyles,
label: "cardnumber",
altText: "XXXX XXXX XXXX XXXX",
redaction: SKyflow.RedactionType.MASKED
redaction: Skyflow.RedactionType.MASKED
)

let cardNumberElement = container?.create(input: cardNumberInput)
Expand Down
2 changes: 1 addition & 1 deletion Samples/Validations/Validations/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class ViewController: UIViewController {
)
let confirmPassword = container?.create(input: confirmPasswordInput, options: collectElementOptions)
self.confirmPasswordElement = confirmPassword
// mount elements on screen - errors will be shown if any of the validaitons fail
// mount elements on screen - errors will be shown if any of the validations fail
stackView.addArrangedSubview(password!)
stackView.addArrangedSubview(confirmPassword!)
let resetButton = UIButton(frame: CGRect(x: 100, y: 400, width: 100, height: 40))
Expand Down
2 changes: 1 addition & 1 deletion Sources/Skyflow/core/Log.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) 2022 Skyflow
*/

// Implemention of different states of LOGS
// Implementation of different states of LOGS

import Foundation

Expand Down
2 changes: 1 addition & 1 deletion Sources/Skyflow/elements/PaddingLabel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) 2022 Skyflow
*/

// Impletementation for TextField other than SkyflowInputField, for ex : [validation error, label, reveal element]
// Implementation for TextField other than SkyflowInputField, for ex : [validation error, label, reveal element]


import Foundation
Expand Down
2 changes: 1 addition & 1 deletion Sources/Skyflow/elements/TextField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ public class TextField: SkyflowElement, Element, BaseElement {
if (listCardTypes!.count >= 2){
imageView.frame = CGRect(x: 0, y: 0, width: 40, height: 24)

// uimenu code
// UIMenu code
if #available(iOS 14.0, *) {
if (cardIconAlignment == .left){
textField.padding.left = 70
Expand Down
2 changes: 1 addition & 1 deletion Sources/Skyflow/elements/TextFieldValidationDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ internal class TextFieldValidationDelegate: NSObject, UITextFieldDelegate {
return customFormat()
}
if let elementType = collectField.fieldType.instance {
if let acceptabledCharacters = elementType.acceptableCharacters, string.rangeOfCharacter(from: acceptabledCharacters) == nil {
if let acceptableCharacters = elementType.acceptableCharacters, string.rangeOfCharacter(from: acceptableCharacters) == nil {
return false
}

Expand Down
6 changes: 3 additions & 3 deletions Sources/Skyflow/elements/core/ElementType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public enum ElementType: Int, CaseIterable {
/// Field type that requires Credit Card Number input formatting and validation.
case CARD_NUMBER

/// Field type that requires Card Expiration Date input formatting and validation, format can be set through CollectElementOptions, defaul is MM/YY
/// Field type that requires Card Expiration Date input formatting and validation, format can be set through CollectElementOptions, default is MM/YY
case EXPIRATION_DATE

/// Field type that requires Card CVV input formatting and validation.
Expand All @@ -46,13 +46,13 @@ public enum ElementType: Int, CaseIterable {
/// A generic field type without any validations
case INPUT_FIELD

/// Field type that requires Card PIN input formatting and validatoin
/// Field type that requires Card PIN input formatting and validation
case PIN

/// Field type that requires Card Expiration Month formatting and validation (format: MM)
case EXPIRATION_MONTH

/// Field type that requires Card Expiration Year formatting and validation, format can be set through CollectElementOptions for YY, defaul is YYYY
/// Field type that requires Card Expiration Year formatting and validation, format can be set through CollectElementOptions for YY, default is YYYY
case EXPIRATION_YEAR


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ internal struct SkyflowValidateCardExpirationDate: ValidationRule {
public let error: SkyflowValidationError
public let format: String

/// Initialzation
/// Initialization
public init(format: String, error: SkyflowValidationError) {
self.error = error
self.format = format
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal struct SkyflowValidateExpirationMonth: ValidationRule {
/// Validation Error
public let error: SkyflowValidationError

/// Initialzation
/// Initialization
public init(error: SkyflowValidationError) {
self.error = error
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal struct SkyflowValidateExpirationYear: ValidationRule {
public let error: SkyflowValidationError
public let format: String

/// Initialzation
/// Initialization
public init(format: String, error: SkyflowValidationError) {
self.error = error
self.format = format
Expand Down
Loading
Loading