Email characteristics test
BigDave
Member Posts: 2,239
My goal is to confirm a player input (text) to be an email.
Besides of a min. of 5 Characters I also do check that it contains "@".
Problem:
If I check if it contains "." it accepts any character as an "."
While the other checked symbols, numbers and letters can be differentiated by the "contains" of "text expression"
I assume its a gamesalad bug?
Comments
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
@BigDave escape it like this
Or better, use textFind to check that at least one "." appears after the "@".
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
Done! Thanks!
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
Ha I got another issue.
I check if the @ is before the .
which works fine.
Tough if an email look like this hey.hey@gmail.com
it is seen as a wrong email
how do I say start checking after the @?
current version
textFind( scene.Email ,"@,1) < textFind( scene.Email ,%.",1)
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de
@BigDave
first find the position of "@"
then use textSubStr to get the string after the "@, i.e. gmail.com"
then check for a "."
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
Decided to try my hand at this. I think I came up with a pretty good parser but... it fails because of a textFind() that somehow finds a period within text that doesn't contain one. Hmm.
Edit: forgot about this: http://forums.gamesalad.com/discussion/comment/525201/#Comment_525201
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang I showed up top how to escape the "."
You need to use "%." in LUA
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
Yep, @Hopscotch... reading ftw. Oops!
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Here's a version where the period detection works properly.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thanks guys using your solution @tatiang
the separation of username, domain and the @ position is nice
My Apps
https://itunes.apple.com/de/artist/david-zobrist/id733552276
https://play.google.com/store/apps/developer?id=David+Zobrist&hl=de