Closed sirvon closed 9 years ago
You want to allow everything but some words?
Correct. On Nov 19, 2014 2:39 AM, "Andrea Baccega" notifications@github.com wrote:
You want to allow everything but some words?
— Reply to this email directly or view it on GitHub https://github.com/vekexasia/android-edittext-validator/issues/31#issuecomment-63621071 .
What about using something like
FormEditText myEditText = (FormEditText) findViewById(R.id.my_edittext);
Validator validator = new NotValidator("You cannot use these words", new RegexpValidator(null, "(banana|apple)"));
myEditText.addValidator(validator);
This will pass for everything not containing the words banana or apple :)
thanks for the example, will try. ill tell you how it goes.
it worked. thank you! personal tutorials on ones code is so priceless in implementation and understanding! thank you once again!
I know I'm cheating but hey #YOLO...
thanks for the lib btw!
So, If I want to exclude certain words from being entered/accepted in the edittext, what shall i do?
for example, if a app member types, vase, I want to tell them sorry but that word can't be submitted.
Thanks!!