Android Question .

Cableguy

Expert
Licensed User
Longtime User
Something like this...

For a = 0 to edittext1.lenght-1
If stringat(edittext1.text,a) ="@" then its an e-mail
Else if a = edittext1.lenght-1 then end of string, no e-mail
Next

This is just the concept, you have to come with the code yourself
 
Upvote 0

TedDog

Member
Licensed User
Longtime User
I had valid email addresses get labeled as invalid using the regex code, so I just used
B4X:
If EditText1.Contains("@") = True AND EditText1.Contains(".") = True Then
  <stuff>
End If
It won't flag illegal characters, but it won't generate false negatives either.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
You can also use a masked EditText with this lib. As plus you find in the example regex-code which checks whether the input is valid (is an allowed eMail) or not. Informatix´s Libs rocks ;)
 
Upvote 0
Top