Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbol acceptance #46

Closed
Robuske opened this issue Aug 3, 2018 · 4 comments
Closed

Symbol acceptance #46

Robuske opened this issue Aug 3, 2018 · 4 comments
Assignees
Labels

Comments

@Robuske
Copy link

Robuske commented Aug 3, 2018

According to the documentation _ and - accept any digits or letters, I understood that it would not add anything else, like punctuation, spaces, etc...
And it seems to not be adding it, but still counting as a symbol or something like that.

Using the mask
"[---] [---] [---]" (it is for passports, basically can have anything)
Wields strange results, if I only use numbers and letters everything goes ok, if I use space or any punctuation symbol it adds a space and jumps to the next brackets group.

I tried with
"[---]-[---]-[---]"
And it adds the -, that's why I think that it goes to the next group.

P.S.: Not related, but you did not update the documentation to reflect the removal of PolyMaskTextFieldDelegate

@Robuske
Copy link
Author

Robuske commented Aug 3, 2018

"[---------]"
Seems to work fine, so the problem is with the separators

@taflanidi taflanidi self-assigned this Aug 3, 2018
@taflanidi
Copy link
Collaborator

taflanidi commented Aug 3, 2018

Hi @Robuske!
Thanks for your question.

It seems that you haven't tried [___] [___] [___] for some reason. Please, do so and come back with your results. The behaviour you describe is expected and completely normal. If you read our docs carefully, there are optional and mandatory characters, and you've used optional - instead of mandatory _.

P.S.: Not related, but you did not update the documentation to reflect the removal of PolyMaskTextFieldDelegate

Yeah, my bad, I need to compose a changelog after all. Still, the new version is 4.0.0, and major version updates are expected to break API backward compatibility.

UPD.: I've found docs inconsistency, the samples still contain PolyMaskTextFieldDelegate, I'll remove them in a few moments, thanks!

@Robuske
Copy link
Author

Robuske commented Aug 5, 2018

Oh yes, I didn't realize it was a side effect of everything being optional, makes sense I guess.

It seems that you haven't tried [] [] [___] for some reason.

Unfortunately, passports seem to have whatever the fuck format the country wants, so I can't retrict count. Although... I am not checking the "complete" property, so it could work.
Anyway "[---------]" looks ok, so I'll just go with it, thanks.

@Robuske Robuske closed this as completed Aug 5, 2018
@taflanidi
Copy link
Collaborator

@Robuske for your information, there's also an elliptical mask [-…] in case you don't want to restrict text length.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants