eltos / SimpleDialogFragments

An Android library to create dialogs with ease and handle user interaction reliably, using fragments and material design.
Apache License 2.0
119 stars 17 forks source link

Custom Input Validation #3

Closed aglose closed 7 years ago

aglose commented 7 years ago

I am trying to user this great library but I have one issue. When using the SimpleFormDialog I cannot add my own validation for a username. Matchers work for many things but I need to be able to check for bad words customers may put into their username. Any suggestions?

eltos commented 7 years ago

If you don't want to create a pattern to filter key words, you can always use the SimpleFormDialog.InputValidator with your own implementation.

Just let the fragment or activity were you show your dialog implement the Interface and the dialog will automatically detect it and use the callback for validation (in addition to any other validations).

eltos commented 7 years ago

Just added a section about Input Validation to the wiki

aglose commented 7 years ago

Wow man what a quick response! and you actually made changes, I'm impressed. Thank you very much!

eltos commented 7 years ago

You're welcome :)