Skip to content

First number of mask(#104) #111

@margulan97

Description

@margulan97

Prerequisites

  • [x ] Put an X between the brackets on this line if you have done all of the following:
    • read our Wiki;
    • read the entire Known issues section;
    • checked that my issue isn't already filled;
    • searched StackOverflow's input-mask tag for similar problems.

I have previous request #104 about first symbol

can you help me where I can fix that behavior, because I have multiple masks that comes from backend and I need to fill it correctly now I fix it only for phone number case.

open func put(text: String, into field: UITextField, autocomplete putAutocomplete: Bool? = nil, valueWithPrefix: Bool = false) -> InputMask.Result
I add value with prefix parameter that duplicate first char, but I have case where I just put masks from backend I look at apply func in Mask, but I can't find solution

if valueWithPrefix && !updatedText.isEmpty {
if let first = updatedText.first {
let firstCharacter = String(first)
updatedText = firstCharacter + updatedText
}
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions